产品-系统多语言合并
This commit is contained in:
parent
a56acb15ce
commit
4d96075efc
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTop, WeaTools } from "ecCom";
|
||||
import { renderNoright } from "../../util";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import moment from "moment";
|
||||
|
|
@ -170,6 +170,7 @@ export default class Calculate extends React.Component {
|
|||
taxAgentStore: { showOperateBtn }
|
||||
} = this.props;
|
||||
let columns = [...salaryListColumns].filter(item => item.dataIndex !== "backCalcStatus" && item.dataIndex !== "acctTimes");
|
||||
const languageidweaver = WeaTools.ls.getJSONObj("languageidweaver");
|
||||
columns.map(item => {
|
||||
if (item.dataIndex === "salarySobName") {
|
||||
item.width = 300;
|
||||
|
|
@ -187,7 +188,7 @@ export default class Calculate extends React.Component {
|
|||
};
|
||||
}
|
||||
if (item.dataIndex === "operate" && showOperateBtn) {
|
||||
item.width = 150;
|
||||
item.width = languageidweaver == "8" ? 260 : 150;
|
||||
item.render = (text, record) => {
|
||||
const accountBtn = _.take(record.operate, 2);
|
||||
const notAccountBtn = _.drop(record.operate, 2);
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@
|
|||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
font-size: 20px!important;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2022/12/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTools } from "ecCom";
|
||||
import { Button, Modal, Radio } from "antd";
|
||||
import { monthDays } from "../config";
|
||||
import { listSalarySobItem } from "../../../apis/ledger";
|
||||
|
|
@ -90,6 +90,7 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
beforeAdjustmentType,
|
||||
afterAdjustmentType
|
||||
} = this.state;
|
||||
const languageidweaver = WeaTools.ls.getJSONObj("languageidweaver");
|
||||
const { title, visible } = this.props;
|
||||
const buttons = [<Button type="primary" onClick={this.handleSave}>{getLabel(537558, "保存")}</Button>];
|
||||
return (
|
||||
|
|
@ -102,8 +103,8 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
buttons={buttons}
|
||||
onCancel={this.handleReset}
|
||||
>
|
||||
<WeaSearchGroup col={1} needTigger title="" showGroup center>
|
||||
<WeaFormItem label={getLabel(542362, "薪资项目")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||
<WeaSearchGroup col={1} needTigger title="" showGroup>
|
||||
<WeaFormItem label={getLabel(542362, "薪资项目")} labelCol={{ span: languageidweaver == "8" ? 6 : 4 }} wrapperCol={{ span: languageidweaver == "8" ? 18 : 20 }}
|
||||
style={{ tableLayout: "fixed" }}>
|
||||
<WeaSelect
|
||||
multiple
|
||||
|
|
@ -114,7 +115,7 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
onChange={(salaryItemId, salaryItemName) => this.setState({ salaryItemId, salaryItemName })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
|
||||
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: languageidweaver == "8" ? 6 : 4 }} wrapperCol={{ span: languageidweaver == "8" ? 18 : 20 }} colon={false}>
|
||||
<div className="adjustRuleDetailWrapper">
|
||||
<div className="adjustSalaryFlex">
|
||||
<span>{getLabel(543496, "如果:调薪生效日期在")}</span>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Dropdown, Menu, message, Tag } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import moment from "moment";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import "../calculate/index.less";
|
||||
|
|
@ -49,6 +49,7 @@ export default class SalarySendList extends React.Component {
|
|||
getColumns = () => {
|
||||
const { payrollStore: { salarySendTableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { columns } = salarySendTableStore;
|
||||
const languageidweaver = WeaTools.ls.getJSONObj("languageidweaver");
|
||||
if (!columns) return [];
|
||||
let result = columns.filter(item => (item.hide === "false" && item.dataIndex !== "acctTimes"));
|
||||
result.map(item => {
|
||||
|
|
@ -90,7 +91,7 @@ export default class SalarySendList extends React.Component {
|
|||
{
|
||||
title: getLabel(30585, "操作"),
|
||||
key: "operate",
|
||||
width: 150,
|
||||
width: languageidweaver == "8" ? 210 : 150,
|
||||
render: (text, record) => {
|
||||
const { sendNum, sendTotal, salaryAcctType, haveBackCalc, canSeeDetail } = record;
|
||||
//显示发放
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class WaterMarkSetModal extends Component {
|
|||
"color": "#093",
|
||||
"marginRight": "5px"
|
||||
}}/>
|
||||
预览
|
||||
{getLabel(221, "预览")}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export const tabCondition = [
|
|||
groupid: "stayAdd",
|
||||
showcount: true,
|
||||
title: getLabel(542711, "待增员"),
|
||||
lanId: 542711,
|
||||
viewcondition: "pending"
|
||||
},
|
||||
{
|
||||
|
|
@ -14,6 +15,7 @@ export const tabCondition = [
|
|||
groupid: "paying",
|
||||
showcount: true,
|
||||
title: getLabel(542504, "在缴员工"),
|
||||
lanId: 542504,
|
||||
viewcondition: "fixed"
|
||||
},
|
||||
{
|
||||
|
|
@ -21,6 +23,7 @@ export const tabCondition = [
|
|||
groupid: "stayDel",
|
||||
showcount: true,
|
||||
title: getLabel(542713, "待减员"),
|
||||
lanId: 542713,
|
||||
viewcondition: "suspend"
|
||||
},
|
||||
{
|
||||
|
|
@ -28,6 +31,7 @@ export const tabCondition = [
|
|||
groupid: "stopPay",
|
||||
showcount: true,
|
||||
title: getLabel(542505, "停缴员工"),
|
||||
lanId: 542505,
|
||||
viewcondition: "stop"
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ export default class Archives extends React.Component {
|
|||
showDropIcon={false} // 是否显示下拉按钮
|
||||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
datas={_.map(tabCondition, it => ({...it, title: getLabel(it.lanId, it.title)}))}
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
counts={tabCount}
|
||||
countParam="groupid" //数量
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2022/12/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaHelpfulTip, WeaInputNumber, WeaSelect, WeaTableEdit } from "ecCom";
|
||||
import { WeaHelpfulTip, WeaInputNumber, WeaSelect, WeaTableEdit, WeaLocaleProvider } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import {
|
||||
compensationBack,
|
||||
|
|
@ -18,6 +18,7 @@ import {
|
|||
import { getQueryString } from "../../../../util/url";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
class AdjustTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -105,7 +106,7 @@ class AdjustTable extends Component {
|
|||
key: "welfareType",
|
||||
render: (text, record, index, onEdit) => (
|
||||
<WeaSelect
|
||||
options={[{ key: "1", showname: "社保" }]}
|
||||
options={[{ key: "1", showname: getLabel(538967, "社保") }]}
|
||||
value={record.welfareType}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("welfareType", v, index)}
|
||||
|
|
@ -171,7 +172,7 @@ class AdjustTable extends Component {
|
|||
<span>{item.title}</span>
|
||||
<WeaHelpfulTip
|
||||
width={200}
|
||||
title="国家核算金额(单位) - 公司核算金额(单位)"
|
||||
title={getLabel(111, "国家核算金额(单位) - 公司核算金额(单位)")}
|
||||
placement="topLeft"
|
||||
/>
|
||||
</span>;
|
||||
|
|
@ -334,13 +335,13 @@ class AdjustTable extends Component {
|
|||
const { targetOptions } = this.state;
|
||||
if (status) {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定撤回吗?撤回后该笔调差将失效!",
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定撤回吗?撤回后该笔调差将失效!"),
|
||||
onOk: () => {
|
||||
const payload = { id, paymentOrganization, billMonth };
|
||||
compensationBack(payload).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(data || "撤回成功");
|
||||
message.success(data || getLabel(505793, "撤回成功"));
|
||||
this.setState({
|
||||
dataSource: _.map(this.state.dataSource, (it, idx) => {
|
||||
if (id === it.id) {
|
||||
|
|
@ -354,7 +355,7 @@ class AdjustTable extends Component {
|
|||
})
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "撤回失败");
|
||||
message.error(errormsg || getLabel(505791, "撤回失败"));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -363,8 +364,8 @@ class AdjustTable extends Component {
|
|||
});
|
||||
} else {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定保存吗?保存后数据将即时更新到台账!",
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定保存吗?保存后数据将即时更新到台账!"),
|
||||
onOk: () => {
|
||||
const {
|
||||
adjustToOptions, categoryTypeOptions, key, target, status,
|
||||
|
|
@ -384,8 +385,8 @@ class AdjustTable extends Component {
|
|||
});
|
||||
if (!bool) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(383779, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
@ -400,7 +401,7 @@ class AdjustTable extends Component {
|
|||
if (status) {
|
||||
const { data: dataMsg, errorMessage = [], successIds = [] } = data;
|
||||
const msg = dataMsg + errorMessage.join(",");
|
||||
!_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功");
|
||||
!_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || getLabel(22619, "保存成功"));
|
||||
if (_.isEmpty(errorMessage)) {
|
||||
this.setState({
|
||||
dataSource: _.map(this.state.dataSource, it => {
|
||||
|
|
@ -412,7 +413,7 @@ class AdjustTable extends Component {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
message.error(errormsg || "保存失败");
|
||||
message.error(errormsg || getLabel(22620, "保存失败"));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -441,13 +442,13 @@ class AdjustTable extends Component {
|
|||
...columns,
|
||||
{
|
||||
dataIndex: "operate",
|
||||
title: "操作",
|
||||
title: getLabel(30585, "操作"),
|
||||
key: "operate",
|
||||
width: 80,
|
||||
render: (text, record) => {
|
||||
const { status } = record;
|
||||
return <a href="javascript: void(0);"
|
||||
onClick={() => this.handleClick(record)}>{status ? "撤回" : "保存"}</a>;
|
||||
onClick={() => this.handleClick(record)}>{status ? getLabel(32025, "撤回") : getLabel(537558, "保存")}</a>;
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -7,11 +7,12 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Alert, message } from "antd";
|
||||
import { WeaSlideModal, WeaTable } from "ecCom";
|
||||
import { WeaSlideModal, WeaTable, WeaLocaleProvider } from "ecCom";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { compensationConfigSave } from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class AdjustmentDefaultSlide extends Component {
|
||||
|
|
@ -38,9 +39,9 @@ class AdjustmentDefaultSlide extends Component {
|
|||
compensationConfigSave(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("保存成功");
|
||||
message.success(getLabel(22619, "保存成功"));
|
||||
} else {
|
||||
message.error(errormsg || "保存失败");
|
||||
message.error(errormsg || getLabel(22620, "保存失败"));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
|
@ -50,7 +51,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
const { loading } = this.state;
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "target", title: "调差对象",
|
||||
dataIndex: "target", title: getLabel(542285, "调差对象"),
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>{_.map(record.targetOptions, it => it.showname).join(",")}</span>
|
||||
|
|
@ -58,7 +59,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
}
|
||||
},
|
||||
{
|
||||
dataIndex: "welfareType", title: "统计调差福利",
|
||||
dataIndex: "welfareType", title: getLabel(542286, "统计调差福利"),
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>社保</span>
|
||||
|
|
@ -66,7 +67,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
}
|
||||
},
|
||||
{
|
||||
dataIndex: "categoryType", title: "统计调差福利类型(单位)",
|
||||
dataIndex: "categoryType", title: getLabel(542287, "统计调差福利类型(单位)"),
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>{_.map(record.categoryTypeOptions, it => it.showname).join(",")}</span>
|
||||
|
|
@ -74,7 +75,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
}
|
||||
},
|
||||
{
|
||||
dataIndex: "adjustTo", title: "调差到(单位)",
|
||||
dataIndex: "adjustTo", title: getLabel(542291, "调差到(单位)"),
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>{_.find(record.adjustToOptions, it => it.key === record.adjustTo).showname}</span>
|
||||
|
|
@ -93,7 +94,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="调差"
|
||||
subtitle={getLabel(543244, "调差")}
|
||||
tabs={[]}
|
||||
loading={loading}
|
||||
showOperateBtn={showOperateBtn}
|
||||
|
|
@ -105,7 +106,7 @@ class AdjustmentDefaultSlide extends Component {
|
|||
content={
|
||||
<div>
|
||||
<Alert
|
||||
message="提示:请确保调差对象在下月还在职且缴纳方案不变,否则下月调差无法按默认设置自动统计"
|
||||
message={getLabel(111, "提示:请确保调差对象在下月还在职且缴纳方案不变,否则下月调差无法按默认设置自动统计")}
|
||||
type="warning"
|
||||
showIcon
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@
|
|||
* Date: 2022/11/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
import { regColumns } from "../constant";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class RegEditDetial extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -22,7 +23,7 @@ class RegEditDetial extends Component {
|
|||
key: "social",
|
||||
label: getLabel(538967, "社保"),
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
columns: _.map(_.map(regColumns, it => ({ ...it, title: getLabel(it.lanId, it.title) })), item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -43,9 +44,9 @@ class RegEditDetial extends Component {
|
|||
},
|
||||
{
|
||||
key: "fund",
|
||||
label:getLabel(538969, "公积金") ,
|
||||
label: getLabel(538969, "公积金"),
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
columns: _.map(_.map(regColumns, it => ({ ...it, title: getLabel(it.lanId, it.title) })), item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -68,7 +69,7 @@ class RegEditDetial extends Component {
|
|||
key: "other",
|
||||
label: getLabel(542717, "企业年金及其他福利"),
|
||||
dataSource: [],
|
||||
columns: _.map(regColumns, item => {
|
||||
columns: _.map(_.map(regColumns, it => ({ ...it, title: getLabel(it.lanId, it.title) })), item => {
|
||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -199,13 +200,13 @@ class RegEditDetial extends Component {
|
|||
let socialSecurity = [], accumulationFund = [], otherBenefits = [];
|
||||
const { data: result } = data;
|
||||
_.map(result, it => {
|
||||
if (it.title.indexOf(getLabel(538967, "社保")) !== -1) {
|
||||
if (it.titleSign === "social") {
|
||||
socialSecurity.push(it);
|
||||
}
|
||||
if (it.title.indexOf(getLabel(538969, "公积金")) !== -1) {
|
||||
if (it.titleSign === "fund") {
|
||||
accumulationFund.push(it);
|
||||
}
|
||||
if (it.title.indexOf(getLabel(25740, "其他")) !== -1) {
|
||||
if (it.titleSign === "other") {
|
||||
otherBenefits.push(it);
|
||||
}
|
||||
});
|
||||
|
|
@ -227,9 +228,9 @@ class RegEditDetial extends Component {
|
|||
result = _.map(_.uniqWith(fieldItems, _.isEqual), item => {
|
||||
let obj = { benefits: item };
|
||||
_.forEach(data, it => {
|
||||
if (item === it.insuranceName && it.paymentScope === getLabel(500201, "个人")) {
|
||||
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
||||
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
||||
} else if (item === it.insuranceName && it.paymentScope === getLabel(388108, "公司")) {
|
||||
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
||||
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,16 +37,19 @@ export const archiveTabs = [
|
|||
export const regColumns = [
|
||||
{
|
||||
title: getLabel(543262, "福利项"),
|
||||
lanId: 543262,
|
||||
dataIndex: "benefits",
|
||||
key: "benefits"
|
||||
},
|
||||
{
|
||||
title: getLabel(543263, "个人缴纳金额"),
|
||||
lanId: 543263,
|
||||
dataIndex: "personalPaymentAmount",
|
||||
key: "personalPaymentAmount"
|
||||
},
|
||||
{
|
||||
title: getLabel(543264, "单位缴纳金额"),
|
||||
lanId: 543264,
|
||||
dataIndex: "companyPaymentAmount",
|
||||
key: "companyPaymentAmount"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue