diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js index cd2c9c44..86ae2570 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js @@ -1,10 +1,12 @@ import React from "react"; import ImportModal from "../../../../components/importModal"; import { Badge, Button, message } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import { inject, observer } from "mobx-react"; import SelectFieldModal from "./selectFieldModal"; import { getQueryString } from "../../../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "standingBookStore") @observer export default class AcctResultImportModal extends React.Component { @@ -36,25 +38,25 @@ export default class AcctResultImportModal extends React.Component { } } - getImportField=()=>{ + getImportField = () => { const { calculateStore: { getImportField }, id } = this.props; getImportField(id).then(data => { this.setState({ - modalParam:{ + modalParam: { ...this.state.modalParam, salaryAcctRecordId: id, salaryItemIds: data.checkItems.join(",") } }); }); - } + }; // 获取模板 handleAccResultTemplateLink() { const { isStandingBook, standingBookTabKey, standingBookType } = this.props; let url = ""; if (_.isEmpty(this.state.modalParam.salaryItemIds)) { - message.warning("请选择表单字段"); + message.warning(getLabel(111, "请选择表单字段")); return; } if (!isStandingBook) { @@ -103,7 +105,7 @@ export default class AcctResultImportModal extends React.Component { count={!_.isEmpty(this.state.modalParam.salaryItemIds) ? this.state.modalParam.salaryItemIds.split(",").length : 0}> + }}>{getLabel(111, "请选择表单字段")} ; } @@ -223,7 +225,7 @@ export default class AcctResultImportModal extends React.Component { !isStandingBook ? fetchImportAcctResult(params) : standingBookType === "difference" ? - importBalanceInsuranceDetail({...params, billMonth}) : + importBalanceInsuranceDetail({ ...params, billMonth }) : importInsuranceAcctDetail(params); }} templateLink={() => { diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js index f288cc35..5a551afd 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js @@ -1,9 +1,10 @@ import React from "react"; import { Button, Col, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaCheckbox, WeaDialog } from "ecCom"; +import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom"; import { cacheImportField } from "../../../../apis/calculate"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "standingBookStore") @observer export default class SelectFieldModal extends React.Component { @@ -173,14 +174,14 @@ export default class SelectFieldModal extends React.Component { const { isStandingBook } = this.props; return ( { this.props.onCancel(); }} buttons={[ - + ]} >
@@ -188,7 +189,7 @@ export default class SelectFieldModal extends React.Component { !_.isEmpty(fieldData.formulaItems) &&
- { + { this.handleTitleCheckboxChange(value, "formula"); }}/>
@@ -218,7 +219,7 @@ export default class SelectFieldModal extends React.Component { !_.isEmpty(fieldData.inputItems) &&
- { + { this.handleTitleCheckboxChange(value, "input"); }}/>
@@ -248,7 +249,7 @@ export default class SelectFieldModal extends React.Component { !_.isEmpty(fieldData.sqlItems) &&
- { + { this.handleTitleCheckboxChange(value, "sql"); }}/>
@@ -275,7 +276,7 @@ export default class SelectFieldModal extends React.Component { }
- { + { this.showSelectedChange(value); }}/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js index cdb471d8..3b74cf71 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js @@ -1,12 +1,13 @@ import React from "react"; import { Button } from "antd"; -import { WeaCheckbox, WeaInputSearch } from "ecCom"; +import { WeaCheckbox, WeaInputSearch, WeaLocaleProvider } from "ecCom"; import { getQueryString } from "../../util/url"; import CustomTab from "../../components/customTab"; import { inject, observer } from "mobx-react"; import CompareDetailImportModal from "./compareDetailImportModal"; import CustomPaginationTable from "../../components/customPaginationTable"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore") @observer export default class CompareDetail extends React.Component { @@ -45,12 +46,12 @@ export default class CompareDetail extends React.Component { const { acctResultValue, excelResultValue } = record[item.dataIndex]; return (
-
系统值:{acctResultValue}
-
线下值:{excelResultValue}
+
{getLabel(111, "系统值")}:{acctResultValue}
+
{getLabel(111, "线下值")}:{excelResultValue}
{ showDifference &&
- 差值:{calculateCompares(acctResultValue, excelResultValue)} + {getLabel(111, "差值")}:{calculateCompares(acctResultValue, excelResultValue)}
}
@@ -171,9 +172,9 @@ export default class CompareDetail extends React.Component { const renderRightOperation = () => { return (
- - - { + + + { this.setState({ searchValue: value }); @@ -187,12 +188,12 @@ export default class CompareDetail extends React.Component { const renderLeftOperation = () => { return (
- { this.onlyDiffEmployeeChange(value); }} /> - { this.onlyDiffSalaryItemChange(value); }} @@ -212,8 +213,8 @@ export default class CompareDetail extends React.Component { />
- 公式= - 系统值;线下值;差值 + {getLabel(111, "公式")}= + {getLabel(111, "系统值")};{getLabel(111, "线下值")};{getLabel(111, "差值")}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js index 4d386d06..93bcc66b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/abnormalList.js @@ -7,9 +7,10 @@ import React, { Component } from "react"; import { Button, Icon, Spin, Tooltip } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaInputSearch, WeaTable } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("standingBookStore") @observer export default class AbnormalListIndex extends Component { @@ -62,7 +63,7 @@ export default class AbnormalListIndex extends Component { const pagination = { total, current: this.state.current, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, onChange: (current) => { this.setState({ current }); this.getChangeList({ billMonth, current }); @@ -73,10 +74,11 @@ export default class AbnormalListIndex extends Component {
- 账单月份 + {getLabel(111, "账单月份")} + title={`${getLabel(111, "提示")}:${getLabel(111, "列表显示未维护缴纳起始月的账单月入职人员")}(${getLabel(111, "不在系统缴纳范围内")},${getLabel(111, "可添加到缴纳范围")})${getLabel(111, "和有缴纳起始月未维护缴纳最后月的账单月离职人员")}(${getLabel(111, "在系统缴纳范围内")},${getLabel(111, "可从缴纳范围移除")}).`} + > @@ -84,9 +86,9 @@ export default class AbnormalListIndex extends Component {
- + { this.setState({ searchValue: value }); }} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index 90fe32b1..136fe6dc 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSlideModal } from "ecCom"; +import { WeaLocaleProvider, WeaSlideModal } from "ecCom"; import { Button, message, Modal } from "antd"; import SlideModalTitle from "../../../../components/slideModalTitle"; import AdjustTable from "./adjustTable"; @@ -15,6 +15,7 @@ import { compensationSave } from "../../../../apis/standingBook"; import AdjustmentDefaultSlide from "./adjustmentDefaultSlide"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer @@ -45,14 +46,14 @@ class AdjustmentSlide extends Component { }); if (_.isEmpty(dataSource)) { Modal.warning({ - title: "信息确认", - content: "请添加调差项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "请添加调差项")}!`, }); return; } else if (!bool) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!`, }); return; } @@ -72,12 +73,12 @@ class AdjustmentSlide extends Component { if (status) { const { data: dataMsg, errorMessage = [] } = data; const msg = dataMsg + errorMessage.join(","); - !_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功"); + !_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || getLabel(111, "保存成功")); _.isEmpty(errorMessage) && this.adjustTableRef.getCompensationList().then(r => { }); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -94,8 +95,8 @@ class AdjustmentSlide extends Component { }; renderCustomOperate = () => { return [ - , - + , + ]; }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/businessAccounting.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/businessAccounting.js index d3f9f281..052976cc 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/businessAccounting.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/businessAccounting.js @@ -5,9 +5,11 @@ * Date: 2023/1/3 */ import React, { Component } from "react"; -import { WeaInputNumber, WeaSearchGroup } from "ecCom"; +import { WeaInputNumber, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class BusinessAccounting extends Component { renderBaseItem = (dataSource = [], type) => { return
    @@ -43,17 +45,17 @@ class BusinessAccounting extends Component {
    { !_.isEmpty(socialSecurityBase) && - {this.renderBaseItem(socialSecurityBase, "socialSecurityBase")} } { !_.isEmpty(fundBase) && - {this.renderBaseItem(fundBase, "fundBase")} } { !_.isEmpty(otherBase) && - {this.renderBaseItem(otherBase, "otherBase")} }
    diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js index ea62431c..85977863 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js @@ -5,17 +5,18 @@ * Date: 2023/1/3 */ import React, { Component } from "react"; -import { WeaInputNumber, WeaSearchGroup, WeaTable } from "ecCom"; +import { WeaInputNumber, WeaSearchGroup, WeaTable, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; class InputPaymentAmount extends Component { renderInputItem = (dataSource = [], type) => { const columns = [ { - dataIndex: "insuranceName", title: "福利项" + dataIndex: "insuranceName", title: getLabel(111, "福利项") }, { - dataIndex: "per", title: "个人缴纳金额", + dataIndex: "per", title: getLabel(111, "个人缴纳金额"), render: (text, record) => { return ( { return ( { !_.isEmpty(socialPayment) && - {this.renderInputItem(socialPayment, "socialPayment")} } { !_.isEmpty(fundPayment) && - {this.renderInputItem(fundPayment, "fundPayment")} } { !_.isEmpty(otherPayment) && - {this.renderInputItem(otherPayment, "otherPayment")} }
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js index 055007b9..be57afdf 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import RegTop from "./regTop"; import { message, Modal } from "antd"; -import { WeaNewScroll } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll } from "ecCom"; import { getQueryString } from "../../../../util/url"; import * as API from "../../../../apis/standingBook"; import { calcPageNo } from "../../../../util"; @@ -16,6 +16,8 @@ import RegEditDetial from "./regEditDetial"; import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class MakeupDifference extends Component { constructor(props) { super(props); @@ -43,13 +45,13 @@ class MakeupDifference extends Component { const payload = { ids, billMonth, paymentOrganization }; API.delBalance(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); const current = calcPageNo(this.diffListRef.state.pageInfo.total, this.diffListRef.state.pageInfo.current, 10, ids.length); this.diffListRef.recessionList({ current }); this.diffListRef.handleResetSelectRowKeys([]); this.setState({ selectKey: [] }); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); }; @@ -61,8 +63,8 @@ class MakeupDifference extends Component { switch (key) { case "delete": Modal.confirm({ - title: "信息确认", - content: "确定删除数据吗?", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定删除数据吗")}?`, onOk: () => this.delBalance() }); break; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index bbc3c8f1..6d0a12ed 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -158,11 +158,12 @@ export default class NormalIndex extends Component { const { list: dataSource, total, columns } = tableData; const pageInfo = { current, pageSize, total }; const i18n = { - "总计": "total", "编辑": getLabel(111, "编辑"), - "操作": getLabel(111, "操作"), "姓名": getLabel(111, "姓名") + "总计": getLabel(111, "总计"), "编辑": getLabel(111, "编辑"), + "操作": getLabel(111, "操作"), "姓名": getLabel(111, "姓名"), + "共": getLabel(83698, "共"), "条": getLabel(18256, "条") }; childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, pageInfo, i18n, + dataSource, columns, pageInfo, i18n, languageidweaver: WeaLocaleProvider.getUserLanguage(), selectedRowKeys, showSum, siaccountSum, showOperates: !getQueryString("type") }), "*"); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js index 015156ac..1c2aaeb5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js @@ -7,9 +7,10 @@ import React, { Component } from "react"; import { Button, Icon, Spin, Tooltip } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaNewScroll, WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("standingBookStore") @observer export default class OverViewIndex extends Component { @@ -78,7 +79,7 @@ export default class OverViewIndex extends Component { let { list, columns, total } = this.state.tableData; const pagination = { total, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showSizeChanger: true, showQuickJumper: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -102,10 +103,10 @@ export default class OverViewIndex extends Component {
- 账单月份 + {getLabel(111, "账单月份")} + title={`${getLabel(111, "提示")}:${getLabel(111, "正常缴纳")},${getLabel(111, "账单月份即社保福利缴纳月份")}`}> @@ -113,7 +114,7 @@ export default class OverViewIndex extends Component {
- +
{/* table */}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js index c311d035..6d207c8e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js @@ -5,10 +5,11 @@ * Date: 2022/11/22 */ import React, { Component } from "react"; -import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; import { Button, Modal } from "antd"; import RegSelect from "./regSelect"; -import * as API from "../../../../apis/standingBook"; + +const getLabel = WeaLocaleProvider.getLabel; class RegAddEmployee extends Component { constructor(props) { @@ -52,8 +53,8 @@ class RegAddEmployee extends Component { const { onSave } = this.props; if (_.isEmpty(baseInfo.billMonth) || _.isEmpty(baseInfo.items) || _.isEmpty(returnPersonInfo.employee)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -70,13 +71,13 @@ class RegAddEmployee extends Component { const { baseInfo, returnPersonInfo, selectPersonInfo } = this.state; const { loading } = this.props; const buttons = [ - , - + , + ]; const baseItems = [ { com: Picker({ - label: "退差月份", + label: getLabel(111, "退差月份"), value: baseInfo.billMonth, onChange: (billMonth) => { this.setState({ baseInfo: { ...baseInfo, billMonth } }); @@ -85,11 +86,11 @@ class RegAddEmployee extends Component { }, { com: SelectWithAll({ - label: "退差项目", + label: getLabel(111, "退差项目"), options: [ - { key: "1", showname: "社保" }, - { key: "2", showname: "公积金" }, - { key: "3", showname: "企业年金及其他福利" } + { key: "1", showname: getLabel(111, "社保") }, + { key: "2", showname: getLabel(111, "公积金") }, + { key: "3", showname: getLabel(111, "企业年金及其他福利") } ], detailtype: 2, valueAll: baseInfo.itemsAll, @@ -117,7 +118,7 @@ class RegAddEmployee extends Component { const returnPersonItems = [ { com: this.setState({ returnPersonInfo: { ...returnPersonInfo, employee: selected } })} /> @@ -126,7 +127,7 @@ class RegAddEmployee extends Component { const selectPersonItems = [ { com: this.setState({ selectPersonInfo: { ...selectPersonInfo, employee: selected } })} /> @@ -139,9 +140,9 @@ class RegAddEmployee extends Component { hasScroll buttons={buttons} > - - - + + + ); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js index 87f373f4..3965dd41 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js @@ -5,12 +5,13 @@ * Date: 2022/11/23 */ import React, { Component } from "react"; -import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom"; +import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable, WeaLocaleProvider } 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); @@ -19,7 +20,7 @@ class RegEditDetial extends Component { listMap: [ { key: "social", - label: "社保", + label: getLabel(111, "社保"), dataSource: [], columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { @@ -42,7 +43,7 @@ class RegEditDetial extends Component { }, { key: "fund", - label: "公积金", + label:getLabel(111, "公积金") , dataSource: [], columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { @@ -65,7 +66,7 @@ class RegEditDetial extends Component { }, { key: "other", - label: "企业年金及其他福利", + label: getLabel(111, "企业年金及其他福利"), dataSource: [], columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { @@ -140,10 +141,10 @@ class RegEditDetial extends Component { API.editAccount(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); onCancel(true); } else { - message.error(errormsg || "保存成功"); + message.error(errormsg || getLabel(111, "保存失败")); } }); }; @@ -198,13 +199,13 @@ class RegEditDetial extends Component { let socialSecurity = [], accumulationFund = [], otherBenefits = []; const { data: result } = data; _.map(result, it => { - if (it.title.indexOf("社保") !== -1) { + if (it.title.indexOf(getLabel(111, "社保")) !== -1) { socialSecurity.push(it); } - if (it.title.indexOf("公积金") !== -1) { + if (it.title.indexOf(getLabel(111, "公积金")) !== -1) { accumulationFund.push(it); } - if (it.title.indexOf("其他") !== -1) { + if (it.title.indexOf(getLabel(111, "其他")) !== -1) { otherBenefits.push(it); } }); @@ -226,9 +227,9 @@ class RegEditDetial extends Component { result = _.map(_.uniqWith(fieldItems, _.isEqual), item => { let obj = { benefits: item }; _.forEach(data, it => { - if (item === it.insuranceName && it.paymentScope === "个人") { + if (item === it.insuranceName && it.paymentScope === getLabel(111, "个人")) { obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue }); - } else if (item === it.insuranceName && it.paymentScope === "公司") { + } else if (item === it.insuranceName && it.paymentScope === getLabel(111, "公司")) { obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue }); } }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js index 477de105..d13c0995 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js @@ -6,6 +6,7 @@ */ import React, { Component } from "react"; import { Spin } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import { getQueryString } from "../../../../util/url"; import * as API from "../../../../apis/standingBook"; import { sysConfCodeRule } from "../../../../apis/ruleconfig"; @@ -17,6 +18,8 @@ const APIFox = { "difference": API.balanceList }; +const getLabel = WeaLocaleProvider.getLabel; + class RegList extends Component { constructor(props) { super(props); @@ -70,8 +73,13 @@ class RegList extends Component { postMessageToChild = () => { const childFrameObj = document.getElementById("atdTable"); const { pageInfo, dataSource, columns, selectedRowKeys, showSum, siaccountSum } = this.state; + const i18n = { + "总计": getLabel(111, "总计"), "编辑": getLabel(111, "编辑"), + "操作": getLabel(111, "操作"), "姓名": getLabel(111, "姓名"), + "共": getLabel(83698, "共"), "条": getLabel(18256, "条") + }; childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, pageInfo, + dataSource, columns, pageInfo, i18n, languageidweaver: WeaLocaleProvider.getUserLanguage(), selectedRowKeys, showSum, siaccountSum, showOperates: !getQueryString("type") }), "*"); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js index 78a837b9..dece0186 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js @@ -1,8 +1,10 @@ import React, { Component } from "react"; import { Button } from "antd"; -import { WeaHelpfulTip, WeaInputSearch, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; import { getQueryString } from "../../../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; + class RegTop extends Component { constructor(props) { super(props); @@ -19,25 +21,25 @@ class RegTop extends Component { -
提示:
-
个人合计=社保个人合计+公积金个人合计+其他福利个人合计
-
单位合计=社保单位合计+公积金单位合计+其他福利单位合计
-
社保合计=社保个人合计+社保单位合计
-
公积金合计=公积金个人合计+公积金单位合计
-
其他福利合计=其他福利个人合计+其他福利单位合计
-
合计=社保合计+公积金合计+其他福利合计
+
{getLabel(111, "提示")}:
+
{getLabel(111, "个人合计")}={getLabel(111, "社保个人合计")}+{getLabel(111, "公积金个人合计")}+{getLabel(111, "其他福利个人合计")}
+
{getLabel(111, "单位合计")}={getLabel(111, "社保单位合计")}+{getLabel(111, "公积金单位合计")}+{getLabel(111, "其他福利单位合计")}
+
{getLabel(111, "社保合计")}={getLabel(111, "社保个人合计")}+{getLabel(111, "社保单位合计")}
+
{getLabel(111, "公积金合计")}={getLabel(111, "公积金个人合计")}+{getLabel(111, "公积金单位合计")}
+
{getLabel(111, "其他福利合计")}={getLabel(111, "其他福利个人合计")}+{getLabel(111, "其他福利单位合计")}
+
{getLabel(111, "合计")}={getLabel(111, "社保合计")}+{getLabel(111, "公积金合计")}+{getLabel(111, "其他福利合计")}
} placement="bottomRight" width={250} />, , this.setState({ name })} onSearch={() => onChange("search")} /> @@ -46,15 +48,15 @@ class RegTop extends Component { const [dom1, ...extra] = dom; const domBtn = regtopType === "regression" ? : ; dom = [ dom1, , domBtn, ...extra ]; } @@ -65,7 +67,7 @@ class RegTop extends Component { const { billMonth } = this.props; return ( 账单月份{billMonth}} + title={{getLabel(111, "账单月份")}{billMonth}} buttons={this.renderTopBtns()} /> ); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index e525dd28..e1502866 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { message, Modal } from "antd"; -import { WeaNewScroll } from "ecCom"; +import { WeaLocaleProvider } from "ecCom"; import RegTop from "./regTop"; import RegList from "./regList"; import RegAddEmployee from "./regAddEmployee"; @@ -16,13 +16,15 @@ import { calcPageNo } from "../../../../util"; import * as API from "../../../../apis/standingBook"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class Regression extends Component { constructor(props) { super(props); this.state = { selectKey: [], returnPersonModal: { - title: "添加退差人员", + title: getLabel(111, "添加退差人员"), visible: false }, returnEditPersonSlide: { @@ -41,13 +43,13 @@ class Regression extends Component { const { selectKey } = this.state; API.delRecession(selectKey).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); const current = calcPageNo(this.regListRef.state.pageInfo.total, this.regListRef.state.pageInfo.current, 10, selectKey.length); this.regListRef.recessionList({ current }); this.regListRef.handleResetSelectRowKeys([]); this.setState({ selectKey: [] }); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); }; @@ -64,10 +66,10 @@ class Regression extends Component { API.saveRecession(payload).then(({ status, errormsg }) => { this.setState({ loading: { ...loading, save: false } }); if (status) { - message.success("操作成功。若退差月无核算明细,账单月则无法获取退差数据。"); + message.success(`${getLabel(111, "操作成功")}。${getLabel(111, "若退差月无核算明细")},${getLabel(111, "账单月则无法获取退差数据")}`); this.handleCloseModal(); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -83,8 +85,8 @@ class Regression extends Component { break; case "delete": Modal.confirm({ - title: "信息确认", - content: "删除人员本账单月将不包含该人员的退差数据!", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "删除人员本账单月将不包含该人员的退差数据")}!`, onOk: () => { this.delRecession(); }, @@ -106,7 +108,7 @@ class Regression extends Component { handleCloseModal = (refreshList = false) => { const { returnPersonModal, returnEditPersonSlide } = this.state; this.setState({ - returnPersonModal: { ...returnPersonModal, visible: false, title: "添加退差人员" }, + returnPersonModal: { ...returnPersonModal, visible: false, title: getLabel(111, "添加退差人员") }, returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" } }, () => { this.regEmmployeeRef.handleReset(); @@ -135,23 +137,23 @@ class Regression extends Component { />
{/**/} - this.regListRef = dom} - visible={returnPersonModal.visible} - onChangeRowkey={(selectKey) => this.setState({ selectKey })} - onEdit={this.handleEdit} - /> - {/*编辑弹框*/} - - {/* 弹框 */} - this.regEmmployeeRef = dom} - {...returnPersonModal} - loading={loading} - onCancel={this.handleCloseModal} - onSave={this.handleSave} - /> + this.regListRef = dom} + visible={returnPersonModal.visible} + onChangeRowkey={(selectKey) => this.setState({ selectKey })} + onEdit={this.handleEdit} + /> + {/*编辑弹框*/} + + {/* 弹框 */} + this.regEmmployeeRef = dom} + {...returnPersonModal} + loading={loading} + onCancel={this.handleCloseModal} + onSave={this.handleSave} + /> {/**/}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js index 4beb586f..74d33c1b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { message, Modal } from "antd"; -import { WeaFormItem, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom"; +import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../../../components/slideModalTitle"; import { Picker, SelectWithAll } from "./regAddEmployee"; import { Browser } from "../../../dataAcquisition/addItems"; @@ -16,6 +16,8 @@ import "./index.less"; import BusinessAccounting from "./businessAccounting"; import InputPaymentAmount from "./inputPaymentAmount"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class SupplementarySlide extends Component { @@ -119,15 +121,15 @@ class SupplementarySlide extends Component { const { supplementType, projects, projectsAll, billMonthList, includes, historyMonth } = baseInfo; if (!projects || !billMonthList || !includes) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } if (supplementType === "2" && !historyMonth) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -148,7 +150,7 @@ class SupplementarySlide extends Component { onCancel(true); this.handleResetForm(); } else { - message.error(errormsg || "接口调用失败!"); + message.error(errormsg || getLabel(111, "接口调用失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -185,9 +187,9 @@ class SupplementarySlide extends Component { if (status) { this.setState({ businessAccounting: { - socialSecurityBase: _.filter(data, it => it.title === "社保"), - fundBase: _.filter(data, it => it.title === "公积金"), - otherBase: _.filter(data, it => it.title === "企业年金及其它福利") + socialSecurityBase: _.filter(data, it => it.title === getLabel(111, "社保")), + fundBase: _.filter(data, it => it.title === getLabel(111, "公积金")), + otherBase: _.filter(data, it => it.title === getLabel(111, "企业年金及其它福利")) } }); } else { @@ -214,9 +216,9 @@ class SupplementarySlide extends Component { if (status) { this.setState({ inputPaymentAmount: { - socialPayment: this.convertData(_.filter(data, it => it.title === "社保")), - fundPayment: this.convertData(_.filter(data, it => it.title === "公积金")), - otherPayment: this.convertData(_.filter(data, it => it.title === "企业年金及其它福利")) + socialPayment: this.convertData(_.filter(data, it => it.title === getLabel(111, "社保"))), + fundPayment: this.convertData(_.filter(data, it => it.title === getLabel(111, "公积金"))), + otherPayment: this.convertData(_.filter(data, it => it.title === getLabel(111, "企业年金及其它福利"))) } }); } else { @@ -250,7 +252,7 @@ class SupplementarySlide extends Component { const baseItems = [ { com: Browser({ - label: "对象", + label: getLabel(111, "对象"), viewAttr: 3, value: baseInfo.includes, valueSpan: baseInfo.includeNames, @@ -267,7 +269,7 @@ class SupplementarySlide extends Component { }, { com: Picker({ - label: "补缴月份", + label: getLabel(111, "补缴月份"), value: baseInfo.billMonthList, onChange: (billMonthList) => { this.setState({ baseInfo: { ...baseInfo, billMonthList } }); @@ -276,13 +278,13 @@ class SupplementarySlide extends Component { }, { com: SelectWithAll({ - label: "补缴项目", + label: getLabel(111, "补缴项目"), options: [ - { key: "1", showname: "社保" }, - { key: "2", showname: "公积金" }, - { key: "3", showname: "企业年金及其他福利" }, - { key: "4", showname: "养老保险" }, - { key: "5", showname: "医疗保险" } + { key: "1", showname: getLabel(111, "社保") }, + { key: "2", showname: getLabel(111, "公积金") }, + { key: "3", showname: getLabel(111, "企业年金及其他福利") }, + { key: "4", showname: getLabel(111, "养老保险") }, + { key: "5", showname: getLabel(111, "医疗保险") } ], detailtype: 2, valueAll: baseInfo.projectsAll, @@ -334,11 +336,11 @@ class SupplementarySlide extends Component { }, { com: SelectDetailType({ - label: "补缴金额核算方式", + label: getLabel(111, "补缴金额核算方式"), options: [ - { key: "1", showname: "按补缴人员当前档案基数及方案核算" }, - { key: "2", showname: "按补缴人员的历史月份核算基数和当前档案方案核算" }, - { key: "3", showname: "手动输入补缴金额" } + { key: "1", showname: getLabel(111, "按补缴人员当前档案基数及方案核算") }, + { key: "2", showname: getLabel(111, "按补缴人员的历史月份核算基数和当前档案方案核算") }, + { key: "3", showname: getLabel(111, "手动输入补缴金额") } ], detailtype: 3, value: baseInfo.supplementType, @@ -357,7 +359,7 @@ class SupplementarySlide extends Component { const baseExtraItems = [ { com: Picker({ - label: "补缴基数参考月份", + label: getLabel(111, "补缴基数参考月份"), value: baseInfo.historyMonth, onChange: (historyMonth) => { this.setState({ baseInfo: { ...baseInfo, historyMonth } }, () => this.handleChangeItem()); @@ -389,7 +391,7 @@ class SupplementarySlide extends Component { content={
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js index 6b2634c3..ce9c8b67 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/constant.js @@ -1,50 +1,53 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const unArchiveTabs = [ { title: "正常缴纳", - viewcondition: "NORMAL", + viewcondition: "NORMAL" }, { title: "异动清单", - viewcondition: "LIST", + viewcondition: "LIST" }, { title: "补缴", - viewcondition: "PAY", + viewcondition: "PAY" }, { title: "总览", - viewcondition: "OVERVIEW", - }, + viewcondition: "OVERVIEW" + } ]; export const archiveTabs = [ { title: "正常缴纳", - viewcondition: "NORMAL", + viewcondition: "NORMAL" }, { title: "补缴", - viewcondition: "PAY", + viewcondition: "PAY" }, { title: "总览", - viewcondition: "OVERVIEW", - }, + viewcondition: "OVERVIEW" + } ]; export const regColumns = [ { - title: '福利项', - dataIndex: 'benefits', - key: 'benefits', + title: getLabel(111, "福利项"), + dataIndex: "benefits", + key: "benefits" }, { - title: '个人缴纳金额', - dataIndex: 'personalPaymentAmount', - key: 'personalPaymentAmount', + title: getLabel(111, "个人缴纳金额"), + dataIndex: "personalPaymentAmount", + key: "personalPaymentAmount" }, { - title: '单位缴纳金额', - dataIndex: 'companyPaymentAmount', - key: 'companyPaymentAmount', - }, + title: getLabel(111, "单位缴纳金额"), + dataIndex: "companyPaymentAmount", + key: "companyPaymentAmount" + } ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/condition.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/condition.js index c4512342..9708262d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/condition.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/condition.js @@ -1,3 +1,6 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const conditions = [ { items: [ @@ -6,12 +9,12 @@ export const conditions = [ conditionType: "INPUT", domkey: ["userName"], fieldcol: 14, - label: "姓名", + label: getLabel(111, "姓名"), labelcol: 6, value: "", - viewAttr: 2, + viewAttr: 2 } ], - defaultshow: true, - }, + defaultshow: true + } ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js index f6d366d1..4050ff5b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { WeaCheckbox, WeaTab, WeaTable } from "ecCom"; +import { WeaCheckbox, WeaTab, WeaTable, WeaLocaleProvider } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import * as API from "../../../apis/offlineCompare"; @@ -10,6 +10,7 @@ import CompareDetailImportModal from "../../calculateDetail/compareDetailImportM import { conditions } from "./condition"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("standingBookStore") @observer class StandingBookOfflineComparison extends Component { @@ -62,10 +63,10 @@ class StandingBookOfflineComparison extends Component { const { acctResultValue, excelResultValue } = record[it.dataIndex] || {}; if (Object.prototype.toString.call(text) === "[object Object]") { return -
系统值:{acctResultValue}
-
线下值:{excelResultValue}
+
{getLabel(111, "系统值")}:{acctResultValue}
+
{getLabel(111, "线下值")}:{excelResultValue}
- 差值:{calculateCompares(acctResultValue, excelResultValue)} + {getLabel(111, "差值")}:{calculateCompares(acctResultValue, excelResultValue)}
; } @@ -93,17 +94,17 @@ class StandingBookOfflineComparison extends Component { return renderLoading(); } const buttons = [ - , - + , + ]; const adBtn = [ , - , - + }}>{getLabel(111, "搜索")}, + , + ]; return (
@@ -112,7 +113,7 @@ class StandingBookOfflineComparison extends Component { buttons={buttons} buttonsAd={adBtn} searchType={["base", "advanced"]} - searchsBasePlaceHolder="请输入姓名" + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} showSearchAd={showSearchAd} setShowSearchAd={showSearchAd => this.setState({ showSearchAd })} searchsAd={getSearchs(form, conditions, 2)} @@ -131,7 +132,7 @@ class StandingBookOfflineComparison extends Component { this.setState({ onlyDiffEmployee }, () => { this.comparisonwelfareList(); }) - } content="只显示有差异的人员"/> + } content={getLabel(111, "只显示有差异的人员")}/> } /> `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], onShowSizeChange: (current, pageSize) => {