From f4f024867b77a31cbb2f8fe599b38248dc9990dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 13 Apr 2023 17:32:27 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customPaginationTable/index.js | 5 ++++- pc4mobx/hrmSalary/pages/mySalary/index.js | 13 +++++++------ pc4mobx/hrmSalary/pages/mySalary/payrollModal.js | 5 +++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/components/customPaginationTable/index.js b/pc4mobx/hrmSalary/components/customPaginationTable/index.js index 72fcddd5..a1853c1d 100644 --- a/pc4mobx/hrmSalary/components/customPaginationTable/index.js +++ b/pc4mobx/hrmSalary/components/customPaginationTable/index.js @@ -1,6 +1,9 @@ import React, { PureComponent } from "react"; +import { WeaLocaleProvider } from "ecCom"; import CustomTable from "../../components/customTable"; +const getLabel = WeaLocaleProvider.getLabel; + class CustomPaginationTable extends PureComponent { shouldComponentUpdate(nextProps, nextState, nextContext) { return !(nextProps.columnIndex && this.props.columnIndex !== nextProps.columnIndex); @@ -15,7 +18,7 @@ class CustomPaginationTable extends PureComponent { this.props.onPageChange(value); }, total: this.props.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, current: this.props.current, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index 6902836e..b41e87d3 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { DatePicker } from "antd"; -import { WeaNewScroll, WeaTop } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import moment from "moment"; @@ -10,6 +10,7 @@ import Authority from "./authority"; import CustomPaginationTable from "../../components/customPaginationTable"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const { RangePicker } = DatePicker; @inject("mySalaryStore") @@ -63,7 +64,7 @@ export default class MySalary extends React.Component { return ( { this.handleView(record); - }}>查看 + }}>{getLabel(130277, "查看1")} ); } }); @@ -118,17 +119,17 @@ export default class MySalary extends React.Component { const topTab = [ { - title: "工资单", + title: getLabel(503, "工资单"), viewcondition: "0" }, { - title: "调薪记录", + title: getLabel(111, "调薪记录"), viewcondition: "2" } ]; const renderSearchOperationItem = () => { if (this.state.selectedKey === "0") { - return (
薪资所属月: + return (
{getLabel(111, "薪资所属月:")} } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 diff --git a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js index bd82b91d..f65f24a2 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js +++ b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js @@ -1,9 +1,10 @@ import React from "react"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; import "../payroll/templatePreview/index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("mySalaryStore") @observer @@ -19,7 +20,7 @@ export default class PayrollModal extends React.Component { const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups); return ( { this.props.onCancel(); }} From 5545b59b3a7c16b02e61896caa6a7d85b78684f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 14 Apr 2023 13:29:21 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.js | 4 +- .../hrmSalary/components/importModal/index.js | 23 +-- .../components/importModal/modalStep1.js | 49 ++++--- .../components/importModal/modalStep3.js | 15 +- .../components/slideModalTitle/index.js | 5 +- pc4mobx/hrmSalary/pages/mySalary/index.js | 4 +- .../archives/accumulationFundForm.js | 15 +- .../archives/baseForm.js | 21 +-- .../archives/config/index.js | 11 +- .../socialSecurityBenefits/archives/index.js | 131 +++++++++--------- .../archives/otherForm.js | 11 +- .../archives/socialSecurityForm.js | 17 +-- .../programme/columns.js | 119 +++------------- .../programme/copySchemaModal.js | 9 +- .../programme/customBenefitsTable.js | 18 +-- .../programme/customNewModal.js | 9 +- .../programme/defaultSlideForm.js | 33 ++--- .../socialSecurityBenefits/programme/enum.js | 17 ++- .../socialSecurityBenefits/programme/index.js | 60 ++++---- .../programme/paymentPeriodModal.js | 36 ++--- .../standingBook/components/abnormalDrawer.js | 31 +++-- .../standingBook/components/accountDialog.js | 16 ++- .../standingBook/index.js | 52 +++---- 23 files changed, 325 insertions(+), 381 deletions(-) diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.js b/pc4mobx/hrmSalary/components/TipLabel/index.js index 5671fb88..8d4b1397 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.js +++ b/pc4mobx/hrmSalary/components/TipLabel/index.js @@ -1,12 +1,14 @@ import React from "react"; +import { WeaLocaleProvider } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; export default class TipLabel extends React.Component { render() { return (
- {this.props.title ? this.props.title : "小提示"} + {this.props.title ? this.props.title : getLabel(111, "小提示")}
{this.props.tipList && this.props.tipList.map(item =>
{item}
)} diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js index 012c113f..66630309 100644 --- a/pc4mobx/hrmSalary/components/importModal/index.js +++ b/pc4mobx/hrmSalary/components/importModal/index.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaDialog, WeaSteps } from "ecCom"; +import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom"; import { Button, message } from "antd"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; @@ -9,6 +9,7 @@ import ModalStep1 from "./modalStep1"; import ModalStep2 from "./modalStep2"; import ModalStep3 from "./modalStep3"; +const getLabel = WeaLocaleProvider.getLabel; const Step = WeaSteps.Step; @inject("taxAgentStore") @@ -45,8 +46,8 @@ export default class ImportModal extends React.Component { if (this.props.renderFormComponent) { params && Object.keys(params).forEach((key) => { if (!params[key] || params[key] == "") { - message.warning("请完善导入选项"); - throw new Error("请完善导入选项"); + message.warning(getLabel(111, "请完善导入选项")); + throw new Error(getLabel(111, "请完善导入选项")); } }); } @@ -64,7 +65,7 @@ export default class ImportModal extends React.Component { if (this.state.fileId) { this.props.setStep(1); } else { - message.warning("请上传文件"); + message.warning(getLabel(111, "请上传文件")); } } @@ -102,7 +103,7 @@ export default class ImportModal extends React.Component { const { step, slideDataSource, isInit, isStandingBook, params, needimportSelected } = this.props; return ( { localStorage.removeItem("fileList"); this.props.onCancel(); @@ -113,26 +114,26 @@ export default class ImportModal extends React.Component { initLoadCss buttons={ this.props.step === 0 ? [ - + ] : this.props.step === 1 ? [ - , + , + }}>{getLabel(111, "下一步")} ] : [ + }}>{getLabel(111, "完成")} ] } >
- - + +
{ diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js index 9aa7bf59..27b40bc4 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js @@ -1,9 +1,11 @@ import React from "react"; -import { WeaCheckbox,WeaTools } from "ecCom"; +import { WeaCheckbox, WeaLocaleProvider, WeaTools } from "ecCom"; import { inject, observer } from "mobx-react"; import { Icon, message, Upload } from "antd"; const Dragger = Upload.Dragger; +const getLabel = WeaLocaleProvider.getLabel; +; @inject("taxAgentStore") @observer @@ -14,7 +16,7 @@ export default class ModalStep1 extends React.Component { datetime: "", taxAgentId: "", hasData: "0", - fileList: WeaTools.ls.getJSONObj('fileList') || [] + fileList: WeaTools.ls.getJSONObj("fileList") || [] }; } @@ -52,7 +54,7 @@ export default class ModalStep1 extends React.Component { this.props.onFileIdChange(""); } - this.setState({ fileList },()=>localStorage.setItem("fileList", JSON.stringify(this.state.fileList))); + this.setState({ fileList }, () => localStorage.setItem("fileList", JSON.stringify(this.state.fileList))); } render() { @@ -77,7 +79,7 @@ export default class ModalStep1 extends React.Component { { this.props.formComponent &&
- 导入选项 + {getLabel(111, "导入选项")}
{this.props.formComponent} @@ -87,7 +89,7 @@ export default class ModalStep1 extends React.Component {
- 导入Excel + {getLabel(111, "导入Excel")}
@@ -95,8 +97,9 @@ export default class ModalStep1 extends React.Component {

-

点击或将文件拖拽到此区域上传

-

支持单个或批量上传,严禁上传公司内部资料及其他违禁文件

+

{getLabel(111, "点击或将文件拖拽到此区域上传")}

+

{getLabel(111, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}

@@ -105,11 +108,11 @@ export default class ModalStep1 extends React.Component {
- 操作步骤 + {getLabel(111, "操作步骤")}
-

1. 第一步,请选择导出的Excel文件或 +

{`1. ${getLabel(111, "第一步")},${getLabel(111, "请选择导出的Excel文件或")}`} { (typeof this.props.templateLink) == "string" ? { @@ -118,8 +121,8 @@ export default class ModalStep1 extends React.Component { try { params && Object.keys(params).forEach((key) => { if (!params[key] || params[key] == "") { - message.warning("请完善导入选项,再下载!"); - throw new Error("请完善导入选项,再下载!"); + message.warning(`${getLabel(111, "请完善导入选项")}, ${getLabel(111, "再下载")}!`); + throw new Error(`${getLabel(111, "请完善导入选项")}, ${getLabel(111, "再下载")}!`); } else { if (url.indexOf("?") > 0) { url = `${url}&${key}=${params[key]}`; @@ -133,11 +136,11 @@ export default class ModalStep1 extends React.Component { } } window.open(url, "_blank"); - }}>点击这里下载模板 + }}>{getLabel(111, "点击这里下载模板")} : { this.props.templateLink(hasData === "1" ? `true` : `false`); - }}>点击这里下载模板 + }}>{getLabel(111, "点击这里下载模板")} } {this.props.headerSetCompoent && this.props.headerSetCompoent}; @@ -145,31 +148,33 @@ export default class ModalStep1 extends React.Component { this.props.isInit && this.setState({ hasData })} /> }

-

2. 第二步,请一定要确定Excel文档中的格式是模板中的格式,没有被修改掉;

-

3. 第三步,选择填写好的Excel文档,点击“下一步”按钮进行数据预览;

-

4. 第四步,如果以上步骤和Excel文档正确的话,数据会被正确导入,导入成功会有提示。如果有问题,则会提示Excel文档的错误之处。

+

{`2. ${getLabel(111, "第二步")},${getLabel(111, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(111, "没有被修改掉")};`}

+

{`3. ${getLabel(111, "第三步")},${getLabel(111, "选择填写好的Excel文档")},${getLabel(111, "点击“下一步”按钮进行数据预览")};`}

+

+ {`4. ${getLabel(111, "第四步")},${getLabel(111, "如果以上步骤和Excel文档正确的话")},${getLabel(111, "导入成功会有提示")},${getLabel(111, "数据会被正确导入")}。${getLabel(111, "如果有问题")},${getLabel(111, "则会提示Excel文档的错误之处")}。`} +

- Excel文件说明 + {getLabel(111, "Excel文件说明")}
- 1. 后缀名为xls或者xlsx;
- 2. 数据请勿放在合并的单元格中;
+ {`1. ${getLabel(111, "后缀名为xls或者xlsx")};`}
+ {`2. ${getLabel(111, "数据请勿放在合并的单元格中")};`}
{ this.props.isStandingBook && - 3. 账单月份格式必须为:YYYY-MM; + {`3. ${getLabel(111, "账单月份格式必须为")}:YYYY-MM;`} }
diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep3.js b/pc4mobx/hrmSalary/components/importModal/modalStep3.js index 004ff029..5fe2c8eb 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep3.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep3.js @@ -1,13 +1,14 @@ import React from "react"; import successImg from "./success.svg"; import { Spin } from "antd"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export default class ModalStep3 extends React.Component { componentWillMount() { this.columns = [ { - title: "错误信息", + title: getLabel(111, "错误信息"), dataIndex: "message", key: "message" } @@ -30,21 +31,21 @@ export default class ModalStep3 extends React.Component { {importResult.successCount === undefined ?
- 正在导入请稍后... + {`${getLabel(111, "正在导入请稍后")}...`}
:
- 数据导入完成 + {getLabel(111, "数据导入完成")}
- 已导入 + {getLabel(111, "已导入")} {importResult.successCount}{" "} - 条数据,失败 + {`${getLabel(111, "条数据")},${getLabel(111, "失败")}`} {importResult.errorCount}{" "} - 条数据 + {getLabel(111, "条数据")}
}
diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js index f8953476..863051e3 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js @@ -1,8 +1,9 @@ import React from "react"; import { Button } from "antd"; -import { WeaReqTop } from "ecCom"; +import { WeaReqTop, WeaLocaleProvider } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; export default class SlideModalTitle extends React.Component { componentWillMount() { // 初始化渲染页面 this.state = { @@ -25,7 +26,7 @@ export default class SlideModalTitle extends React.Component { icon={} iconBgcolor="#F14A2D" buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [ - + ] : !_.isEmpty(customOperate) ? customOperate : []} showDropIcon={false} dropMenuDatas={[]} diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index b41e87d3..fdd9cb05 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -58,13 +58,13 @@ export default class MySalary extends React.Component { } }); columns.push({ - title: "操作", + title: getLabel(30585, "操作"), dataIndex: "operate", render: (text, record) => { return ( { this.handleView(record); - }}>{getLabel(130277, "查看1")} + }}>{getLabel(33564, "查看")} ); } }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index 3f2465ab..f6ffbae1 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { message } from "antd"; import { toJS } from "mobx"; -import { WeaSearchGroup } from "ecCom"; +import { WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import { ConsistentWelfare, SocialDatePicker, @@ -13,6 +13,7 @@ import { } from "./socialSecurityForm"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("archivesStore") @observer export default class AccumulationFundForm extends React.Component { @@ -66,7 +67,7 @@ export default class AccumulationFundForm extends React.Component { const { min, max, domkey } = it; const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0; if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) { - message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"); + message.warning(`${getLabel(111, "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充")}。`); paymentData = { ...paymentData, [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val @@ -108,7 +109,7 @@ export default class AccumulationFundForm extends React.Component { { com: SocialDatePicker({ key: "fundStartTime", - label: "公积金起始缴纳月", + label: getLabel(111, "公积金起始缴纳月"), viewAttr: fundSchemeId ? 3 : 2, value: fundStartTime, disabledDate: (current) => { @@ -120,7 +121,7 @@ export default class AccumulationFundForm extends React.Component { { com: SocialEditInput({ key: "fundAccount", - label: "公积金账号", + label: getLabel(111, "公积金账号"), value: fundAccount, onChange: this.handleFormChange }) @@ -128,7 +129,7 @@ export default class AccumulationFundForm extends React.Component { { com: SocialDatePicker({ key: "fundEndTime", - label: "公积金最后缴纳月", + label: getLabel(111, "公积金最后缴纳月"), value: fundEndTime, disabledDate: (current) => { return current && fundStartTime && current.getTime() < new Date(fundStartTime).getTime(); @@ -139,7 +140,7 @@ export default class AccumulationFundForm extends React.Component { { com: SocialEditInput({ key: "supplementFundAccount", - label: "补充公积金账号", + label: getLabel(111, "补充公积金账号"), value: supplementFundAccount, onChange: this.handleFormChange }) @@ -148,7 +149,7 @@ export default class AccumulationFundForm extends React.Component { return (
} items={foundItems} col={2} showGroup needTigger={false}/> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js index 5c658b41..bc621822 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js @@ -1,8 +1,9 @@ import React from "react"; -import { WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom"; +import { WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { inject, observer } from "mobx-react"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("archivesStore") @observer export default class BaseForm extends React.Component { @@ -16,20 +17,20 @@ export default class BaseForm extends React.Component { const { username, department, position, telephone, hiredate, dimissionDate } = baseFormData; const { paymentOrganizationName } = record; const baseItems = [ - { com: Input("姓名", username) }, - { com: Input("部门", department) }, - { com: Input("岗位", position) }, - { com: Input("手机号", telephone) }, - { com: Input("入职日期", hiredate) }, - { com: Input("合同到期日期", dimissionDate) } + { com: Input(getLabel(111, "姓名"), username) }, + { com: Input(getLabel(111, "部门"), department) }, + { com: Input(getLabel(111, "岗位"), position) }, + { com: Input(getLabel(111, "手机号"), telephone) }, + { com: Input(getLabel(111, "入职日期"), hiredate) }, + { com: Input(getLabel(111, "合同到期日期"), dimissionDate) } ]; const taxagentItems = [ - { com: Input("个税扣缴义务人", paymentOrganizationName) } + { com: Input(getLabel(111, "个税扣缴义务人"), paymentOrganizationName) } ]; return (
- - + +
); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js index de89e096..e48b4ed8 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js @@ -1,30 +1,33 @@ +import { WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const tabCondition = [ { color: "#000000", groupid: "stayAdd", showcount: true, - title: "待增员", + title: getLabel(111, "待增员"), viewcondition: "pending" }, { color: "#000000", groupid: "paying", showcount: true, - title: "在缴员工", + title: getLabel(111, "在缴员工"), viewcondition: "fixed" }, { color: "#000000", groupid: "stayDel", showcount: true, - title: "待减员", + title: getLabel(111, "待减员"), viewcondition: "suspend" }, { color: "#000000", groupid: "stopPay", showcount: true, - title: "停缴员工", + title: getLabel(111, "停缴员工"), viewcondition: "stop" } ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index ba1ef02d..4daa492d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { Button, Dropdown, Menu, message, Modal, Popover } from "antd"; -import { WeaHelpfulTip, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom"; import { getSearchs, renderLoading } from "../../../util"; import BaseForm from "./baseForm"; import SlideModalTitle from "../../../components/slideModalTitle"; @@ -16,6 +16,7 @@ import TipLabel from "../../../components/TipLabel"; import UnifiedTable from "../../../components/UnifiedTable"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("archivesStore", "taxAgentStore") @observer export default class Archives extends React.Component { @@ -117,13 +118,13 @@ export default class Archives extends React.Component { }); return tmpV.length > 0 ? [ ...tmpV, { - title: "操作", + title: getLabel(30585, "操作"), dataIndex: "operate", render: (text, record) => { return (
this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"} + onClick={() => this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? getLabel(111, "编辑") : getLabel(111, "查看")} { showOperateBtn && selectedKey === "pending" && this.deleteTodoList({ runStatus: "4", ids: [record.baseInfo] }) }); } }}> - 增员 - 删除待办 + {getLabel(111, "增员")} + {getLabel(111, "删除待办")} } title=""> @@ -154,16 +155,16 @@ export default class Archives extends React.Component { content={ { if (key === "stopSalary") { Modal.confirm({ - title: "信息确认", - content: `确定要删除该条待办人员吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定要删除该条待办人员吗")}?`, onOk: () => this.cancelStayDel({ runStatus: "3", ids: [record.baseInfo] }) }); } else { this.stayDelToStop([record.baseInfo]); } }}> - 减员 - 删除待办 + {getLabel(111, "减员")} + {getLabel(111, "删除待办")} } title=""> @@ -176,7 +177,7 @@ export default class Archives extends React.Component { content={ { if (key === "stopPaying") this.cancelStopPayment([record.baseInfo]); }}> - 取消停缴 + {getLabel(111, "取消停缴")} } title=""> @@ -198,8 +199,8 @@ export default class Archives extends React.Component { const { socialSchemeId, socialStartTime } = data; if (socialSchemeId && !socialStartTime) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -211,8 +212,8 @@ export default class Archives extends React.Component { const { fundSchemeId, fundStartTime } = data; if (fundSchemeId && !fundStartTime) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -224,8 +225,8 @@ export default class Archives extends React.Component { const { otherSchemeId, otherStartTime } = data; if (otherSchemeId && !otherStartTime) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -338,13 +339,13 @@ export default class Archives extends React.Component { if (status) { const { msg, type } = data; if (type === "fail") { - message.error(msg || "操作失败"); + message.error(msg || getLabel(111, "操作失败")); } else if (type === "success") { - message.success(msg || "操作成功!"); + message.success(msg || getLabel(111, "操作成功")); this.query(); } } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } else if (selectedKey === "suspend") { @@ -353,13 +354,13 @@ export default class Archives extends React.Component { if (status) { const { msg, type } = data; if (type === "fail") { - message.error(msg || "操作失败"); + message.error(msg || getLabel(111, "操作失败")); } else if (type === "success") { - message.success(msg || "操作成功!"); + message.success(msg || getLabel(111, "操作成功")); this.query(); } } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } @@ -367,7 +368,7 @@ export default class Archives extends React.Component { handleMenuItemClick = ({ key }) => { const { selectedRowKeys, selectedKey } = this.state; if (selectedRowKeys.length === 0) { - message.warning("未选择任何条目", 1); + message.warning(getLabel(111, "未选择任何条目"), 1); return; } switch (selectedKey) { @@ -399,14 +400,14 @@ export default class Archives extends React.Component { if (status) { const { msg, type } = data; if (type === "fail") { - message.error(msg || "操作失败"); + message.error(msg || getLabel(111, "操作失败")); } else if (type === "success") { - message.success(msg || "操作成功"); + message.success(msg || getLabel(111, "操作成功")); this.query(); this.onSelectChange([]); } } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -416,14 +417,14 @@ export default class Archives extends React.Component { if (status) { const { msg, type } = data; if (type === "fail") { - message.error(msg || "操作失败"); + message.error(msg || getLabel(111, "操作失败")); } else if (type === "success") { - message.success(msg || "操作成功"); + message.success(msg || getLabel(111, "操作成功")); this.query(); this.onSelectChange([]); } } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -432,11 +433,11 @@ export default class Archives extends React.Component { cancelStopPayment = (payload) => { API.cancelStopPayment(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.query(); this.onSelectChange([]); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -444,11 +445,11 @@ export default class Archives extends React.Component { deleteTodoList = (payload) => { API.updateRunStatus(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.query(); this.onSelectChange([]); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -456,11 +457,11 @@ export default class Archives extends React.Component { cancelStayDel = (payload) => { API.cancelStayDel(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.query(); this.onSelectChange([]); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -536,9 +537,9 @@ export default class Archives extends React.Component { }, () => { this.query(); }); - }}>搜索, - , - + }}>{getLabel(111, "搜索")}, + , + ]; // 导出全部 @@ -566,7 +567,7 @@ export default class Archives extends React.Component { const handleMenuClick = () => { const { selectedRowKeys } = this.state; if (selectedRowKeys.length == 0) { - message.warning("未选择任何条目", 1); + message.warning(getLabel(111, "未选择任何条目"), 1); return; } let ids = selectedRowKeys.join(","); @@ -591,13 +592,13 @@ export default class Archives extends React.Component { const btns = selectedKey === "fixed" ? [ , + }}>{getLabel(111, "导入")}, - 导出选中 + {getLabel(111, "导出选中")} } type="ghost"> - 导出全部 + {getLabel(111, "导出全部")} ] : selectedKey === "pending" ? [ - 批量增员 - 批量删除待办 + {getLabel(111, "批量增员")} + {getLabel(111, "批量删除待办")} } type="ghost" > - 全量增员 + {getLabel(111, "全量增员")} , , + }}>{getLabel(111, "导入")}, - 导出选中 + {getLabel(111, "导出选中")} } type="ghost"> - 导出全部 + {getLabel(111, "导出全部")} ] : selectedKey === "suspend" ? [ - 批量减员 - 批量删除待办 + {getLabel(111, "批量减员")} + {getLabel(111, "批量删除待办")} } type="primary" > - 全量减员 + {getLabel(111, "全量减员")} , - 导出选中 + {getLabel(111, "导出选中")} } type="ghost"> - 导出全部 + {getLabel(111, "导出全部")} ] : [ } placement="topLeft" />, - , + , - 导出选中 + {getLabel(111, "导出选中")} } type="ghost"> - 导出全部 + {getLabel(111, "导出全部")} ]; @@ -672,7 +673,7 @@ export default class Archives extends React.Component { current: pageInfo.current, pageSize: pageInfo.pageSize, total: pageInfo.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -695,7 +696,7 @@ export default class Archives extends React.Component { return (
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 @@ -713,7 +714,7 @@ export default class Archives extends React.Component { setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控 searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 buttonsAd={adBtn} // 高级搜索内部按钮 - searchsBasePlaceHolder={"请输入姓名"} + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} onSearch={() => { this.setState({ pageInfo: { @@ -760,17 +761,17 @@ export default class Archives extends React.Component { direction="right" title={ this.handleEditSlideSave()}>保存] : [] + [] : [] } subItemChange={selectedTab => this.setState({ selectedTab })} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 4516e770..e29e72b2 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { message } from "antd"; -import { WeaSearchGroup } from "ecCom"; +import { WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import { toJS } from "mobx"; import { ConsistentWelfare, @@ -12,6 +12,7 @@ import { } from "./socialSecurityForm"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("archivesStore") @observer export default class OtherForm extends React.Component { @@ -65,7 +66,7 @@ export default class OtherForm extends React.Component { const { min, max, domkey } = it; const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0; if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) { - message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"); + message.warning(`${getLabel(111, "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充")}。`); paymentData = { ...paymentData, [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val @@ -104,7 +105,7 @@ export default class OtherForm extends React.Component { { com: SocialDatePicker({ key: "otherStartTime", - label: "其他福利起始缴纳月", + label: getLabel(111, "其他福利起始缴纳月"), viewAttr: otherSchemeId ? 3 : 2, value: otherStartTime, disabledDate: (current) => { @@ -116,7 +117,7 @@ export default class OtherForm extends React.Component { { com: SocialDatePicker({ key: "otherEndTime", - label: "其他福利最后缴纳月", + label: getLabel(111, "其他福利最后缴纳月"), value: otherEndTime, disabledDate: (current) => { return current && otherStartTime && current.getTime() < new Date(otherStartTime).getTime(); @@ -128,7 +129,7 @@ export default class OtherForm extends React.Component { return (
} items={otherItems} col={2} showGroup needTigger={false}/> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 0d96be4e..6f9bc517 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -1,10 +1,11 @@ import React from "react"; -import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom"; import { message } from "antd"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("archivesStore") @observer export default class SocialSecurityForm extends React.Component { @@ -64,7 +65,7 @@ export default class SocialSecurityForm extends React.Component { const { min, max, domkey } = it; const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0; if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) { - message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"); + message.warning(`${getLabel(111, "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充")}。`); paymentData = { ...paymentData, [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val @@ -106,7 +107,7 @@ export default class SocialSecurityForm extends React.Component { { com: SocialDatePicker({ key: "socialStartTime", - label: "社保起始缴纳月", + label: getLabel(111, "社保起始缴纳月"), viewAttr: socialSchemeId ? 3 : 2, value: socialStartTime, disabledDate: (current) => { @@ -118,7 +119,7 @@ export default class SocialSecurityForm extends React.Component { { com: SocialEditInput({ key: "schemeAccount", - label: "社保账号", + label: getLabel(111, "社保账号"), value: schemeAccount, onChange: this.handleFormChange }) @@ -126,7 +127,7 @@ export default class SocialSecurityForm extends React.Component { { com: SocialDatePicker({ key: "socialEndTime", - label: "社保最后缴纳月", + label: getLabel(111, "社保最后缴纳月"), value: socialEndTime, disabledDate: (current) => { return current && socialStartTime && current.getTime() < new Date(socialStartTime).getTime(); @@ -138,7 +139,7 @@ export default class SocialSecurityForm extends React.Component { return (
} items={socialItems} col={2} showGroup needTigger={false}/> @@ -169,7 +170,7 @@ export default class SocialSecurityForm extends React.Component { export const ConsistentWelfare = (props) => { const { onChange, onBlurChange, value } = props; return
- 各项福利基数一致: + {`${getLabel(111, "各项福利基数一致")}:`} { }; export const SocialTitle = (props) => { const { value, onChange, keyname: key } = props; - return onChange({ key, value: val })}/>; + return onChange({ key, value: val })}/>; }; export const SocialSelect = (props) => { const { key, value, onChange, options, label, labelColSpan = 12, wrapperColSpan = 12 } = props; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js index 5acd68bf..f7424f10 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js @@ -1,171 +1,92 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; // 社保 export const socialSecurityColumns = [{ - title: "方案名称", + title: getLabel(111, "方案名称"), dataIndex: "title", key: "title" }, { - title: "缴纳类型", + title: getLabel(111, "缴纳类型"), dataIndex: "username", key: "username" }, { - title: "缴纳范围", + title: getLabel(111, "缴纳范围"), dataIndex: "projectName", key: "projectName" }, { - title: "备注", + title: getLabel(111, "备注"), dataIndex: "customer", key: "customer" }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "customer", key: "customer" }]; - -// 公积金 -export const accumulationFundColumns = [{ - title: "方案名称", - dataIndex: "title", - key: "title" -}, { - title: "缴纳类型", - dataIndex: "username", - key: "username" -}, { - title: "缴纳范围", - dataIndex: "projectName", - key: "projectName" -}, { - title: "备注", - dataIndex: "customer", - key: "customer" -}, { - title: "操作", - dataIndex: "customer", - key: "customer" -}]; - -// 企业年金及其他福利 -export const otherBenefitsColumns = [ - { - title: "方案名称", - dataIndex: "title", - key: "title" - - }, - { - title: "缴纳类型", - dataIndex: "title", - key: "title" - }, - { - title: "缴纳范围", - dataIndex: "title", - key: "title" - }, - { - title: "备注", - dataIndex: "title", - key: "title" - }, - { - title: "操作", - dataIndex: "title", - key: "title" - } -]; - -export const CustomBenefitsColumns = [ - { - title: "福利名称", - dataIndex: "title", - key: "title" - }, - { - title: "启用", - dataIndex: "title", - key: "title" - }, - { - title: "类型", - dataIndex: "title", - key: "title" - }, - { - title: "缴纳对象", - dataIndex: "title", - key: "title" - }, - { - title: "操作", - dataIndex: "title", - key: "title" - } -]; - export const insertUpdateColumns = [ { - title: "类型名称", + title: getLabel(111, "类型名称"), dataIndex: "insuranceName", key: "insuranceName", width: 120, - fixed: 'left' + fixed: "left" }, { - title: "是否缴费", + title: getLabel(111, "是否缴费"), dataIndex: "isPayment", key: "isPayment", width: 100 }, { - title: "缴纳对象", + title: getLabel(111, "缴纳对象"), dataIndex: "paymentScope", key: "paymentScope", width: 100 }, { - title: "缴纳周期", + title: getLabel(111, "缴纳周期"), dataIndex: "paymentCycle", key: "paymentCycle", width: 200 }, { - title: "核算方式", + title: getLabel(111, "核算方式"), dataIndex: "accountType", key: "accountType", width: 200 }, { - title: "基数下限", + title: getLabel(111, "基数下限"), dataIndex: "lowerLimit", key: "lowerLimit", width: 100 }, { - title: "基数上限", + title: getLabel(111, "基数上限"), dataIndex: "upperLimit", key: "upperLimit", width: 100 }, { - title: "缴纳比例%", + title: getLabel(111, "缴纳比例%"), dataIndex: "paymentProportion", key: "paymentProportion", width: 100 }, { - title: "固定费用", + title: getLabel(111, "固定费用"), dataIndex: "fixedCost", key: "fixedCost", width: 100 }, { - title: "有效小数位", + title: getLabel(111, "有效小数位"), dataIndex: "validNum", key: "validNum", width: 100 }, { - title: "进位规则", + title: getLabel(111, "进位规则"), dataIndex: "rententionRule", key: "rententionRule", width: 100 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js index 65ebf88d..8aea4d61 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js @@ -1,7 +1,8 @@ import React from "react"; -import { WeaDialog, WeaError, WeaFormItem, WeaInput } from "ecCom"; +import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; export default class CopySchemaModal extends React.Component { constructor(props) { super(props); @@ -13,7 +14,7 @@ export default class CopySchemaModal extends React.Component { render() { return (
@@ -29,7 +30,7 @@ export default class CopySchemaModal extends React.Component { tipPosition="bottom" ref="weaError" style={{ width: "90%" }} - error={`${this.props.title}名称不能为空`}> + error={`${this.props.title}${getLabel(111, "名称不能为空")}`}> { return ( ); @@ -86,16 +88,16 @@ class CustomBenefitsTable extends Component { }; handleCustomBenefitsSwitch = ({ id }, isUse) => { Modal.confirm({ - title: "信息确认", - content: `确认要${isUse ? "启用" : "停用"}吗`, + title: getLabel(514612, "确认信息"), + content: `${getLabel(33703, "确认")}${isUse ? getLabel(31676, "启用") : getLabel(26471, "停用")}${getLabel(514612, "确认信息")}`, onOk: () => { const payload = { id, isUse }; updateCustomCategoryStatus(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(30700, "操作成功")); this.getCustomCategoryList(); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(30651, "操作失败")); } }); } @@ -106,7 +108,7 @@ class CustomBenefitsTable extends Component { const { dataSource, pageInfo, loading } = this.state; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js index b5a775e4..e9cdd340 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js @@ -1,10 +1,11 @@ import React from "react"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import CustomForm from "../../../components/customForm"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("programmeStore") @observer export default class CustomNewModal extends React.Component { @@ -33,11 +34,11 @@ export default class CustomNewModal extends React.Component { className="customFLOuter" visible={this.props.visible} onCancel={() => this.props.onCancel()} - title={this.props.edit ? "编辑自定义福利" : "新建自定义福利"} + title={this.props.edit ? getLabel(111, "编辑自定义福利") : getLabel(111, "新建自定义福利")} style={{ height: "auto!important" }} buttons={[ - , - + , + ]} > { @@ -253,7 +254,7 @@ export default class DefaultSlideForm extends React.Component { }; } else if (item.dataIndex === "paymentCycle") { item.title =
- 缴纳周期 + {getLabel(111, "缴纳周期")} 设置 + })}>{getLabel(68, "设置")} }
); @@ -315,15 +316,15 @@ export default class DefaultSlideForm extends React.Component { item.render = (text, record) => { if (record.paymentCycle === "0") { return ( -
基数*比例+固定费用
+
{getLabel(111, "基数*比例+固定费用")}
); } else { return ( { @@ -342,8 +343,8 @@ export default class DefaultSlideForm extends React.Component {
{ this.onEdit(record); }}> - 编辑 + {getLabel(93, "编辑")} ); default: @@ -85,7 +86,7 @@ export default class Programme extends React.Component { }); newColumns.push({ - title: "操作", + title: getLabel(30585, "操作"), dataIndex: "operate", render: (text, record) => { return ( @@ -94,7 +95,7 @@ export default class Programme extends React.Component { onClick={() => { this.onEdit(record); }}> - {showOperateBtn ? "编辑" : "查看"} + {showOperateBtn ? getLabel(93, "编辑") : getLabel(33564, "查看")} ); } @@ -112,7 +113,7 @@ export default class Programme extends React.Component { onClick={() => { this.onCopy(record); }}> - 复制 + {getLabel(77, "复制")} {/*暂时隐藏*/} @@ -121,7 +122,7 @@ export default class Programme extends React.Component { onClick={() => { this.onDelete(record); }}> - 删除 + {getLabel(91, "删除")} @@ -139,19 +140,6 @@ export default class Programme extends React.Component { return newColumns; }; - handleCategoryStatusChange(record, value) { - const { programmeStore: { updateCustomCategoryStatus } } = this.props; - Modal.confirm({ - title: "信息确认", - content: `确认要${value ? "启用" : "停用"}吗`, - onOk: () => { - updateCustomCategoryStatus(record.id, value); - }, - onCancel: () => { - } - }); - } - onEdit(record) { let id = record.id; const { programmeStore } = this.props; @@ -175,8 +163,8 @@ export default class Programme extends React.Component { onDelete = (record) => { const { programmeStore: { deleteScheme, deleteLoading, selectedKey } } = this.props; Modal.confirm({ - title: "确认信息", - content: "确认删除本条数据吗?", + title: getLabel(514612, "确认信息"), + content: getLabel(518815, "确认删除本条数据吗?"), confirmLoading: deleteLoading, onOk: () => { deleteScheme({ ids: [record.id], welfareTypeEnum: selectedKey }); @@ -192,7 +180,7 @@ export default class Programme extends React.Component { taxAgentStore: { showOperateBtn } } = this.props; if (!showOperateBtn) { - message.warning("请设置编辑权限!"); + message.warning(getLabel(111, "请设置编辑权限!")); return; } getCustomForm(); @@ -237,38 +225,38 @@ export default class Programme extends React.Component { const topTab = [ { - title: "社保", + title: getLabel(111, "社保"), viewcondition: "SOCIAL_SECURITY" }, { - title: "公积金", + title: getLabel(111, "公积金"), viewcondition: "ACCUMULATION_FUND" }, { - title: "企业年金及其他福利", + title: getLabel(111, "企业年金及其他福利"), viewcondition: "OTHER" }, { - title: "自定义福利", + title: getLabel(111, "自定义福利"), viewcondition: "custom" } ]; const options = [ { - showname: "全部", + showname: getLabel(126831, "全部"), key: "" }, { - showname: "社保", + showname: getLabel(111, "社保"), key: "SOCIAL_SECURITY" }, { - showname: "公积金", + showname: getLabel(111, "公积金"), key: "ACCUMULATION_FUND" }, { - showname: "企业年金及其他福利", + showname: getLabel(111, "企业年金及其他福利"), key: "OTHER" } ]; @@ -365,7 +353,7 @@ export default class Programme extends React.Component { return (
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 @@ -386,7 +374,7 @@ export default class Programme extends React.Component { handleNewClick(); } }}> - 新建 + {getLabel(365, "新建")} } {selectedKey == "custom" && @@ -467,8 +455,8 @@ export default class Programme extends React.Component { it.viewcondition === selectedKey).title}方案` : - `新增${_.find(topTab, it => it.viewcondition === selectedKey).title}方案` + `${getLabel(103, "修改")}${_.find(topTab, it => it.viewcondition === selectedKey).title}${getLabel(103, "方案")}` : + `${getLabel(1421, "新增")}${_.find(topTab, it => it.viewcondition === selectedKey).title}${getLabel(103, "方案")}` } editable={true} showOperateBtn={showOperateBtn} @@ -506,7 +494,7 @@ export default class Programme extends React.Component { onClick={() => { handleCopyModalSave(); }}> - 保存 + {getLabel(86, "保存")} ] } />} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js index 6621acd5..698173de 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js @@ -5,10 +5,11 @@ * Date: 2023/2/1 */ import React, { Component } from "react"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { Button, Checkbox } from "antd"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const CheckboxGroup = Checkbox.Group; class PaymentPeriodModal extends Component { @@ -60,27 +61,28 @@ class PaymentPeriodModal extends Component { const { onCancel, visible } = this.props; const { monthList, allSelect } = this.state; const buttons = [ - , - + , + ]; const options = [ - { label: "一月", value: "1" }, - { label: "二月", value: "2" }, - { label: "三月", value: "3" }, - { label: "四月", value: "4" }, - { label: "五月", value: "5" }, - { label: "六月", value: "6" }, - { label: "七月", value: "7" }, - { label: "八月", value: "8" }, - { label: "九月", value: "9" }, - { label: "十月", value: "10" }, - { label: "十一月", value: "11" }, - { label: "十二月", value: "12" } + { label: getLabel(111, "一月"), value: "1" }, + { label: getLabel(111, "二月"), value: "2" }, + { label: getLabel(111, "三月"), value: "3" }, + { label: getLabel(111, "四月"), value: "4" }, + { label: getLabel(111, "五月"), value: "5" }, + { label: getLabel(111, "六月"), value: "6" }, + { label: getLabel(111, "七月"), value: "7" }, + { label: getLabel(111, "八月"), value: "8" }, + { label: getLabel(111, "九月"), value: "9" }, + { label: getLabel(111, "十月"), value: "10" }, + { label: getLabel(111, "十一月"), value: "11" }, + { label: getLabel(111, "十二月"), value: "12" } ]; return (
- 全选 + {getLabel(111, "全选")}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js index f91d442d..14357a97 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js @@ -5,17 +5,19 @@ * LastEditTime: 2022-04-21 20:08:59 */ import React, { Component } from "react"; -import { Button, Table, Dropdown, Menu, Tooltip, Icon } from "antd"; -import { WeaSlideModal, WeaTable } from "ecCom"; +import { Button, Dropdown, Icon, Menu, Tooltip } from "antd"; +import { WeaLocaleProvider, WeaSlideModal, WeaTable } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; export default class AbnormalDrawer extends Component { constructor(props) { super(props); this.state = { - selectedRowKeys: [], + selectedRowKeys: [] }; } + onSelectChange = (selectedRowKeys) => { this.setState({ selectedRowKeys }); }; @@ -25,7 +27,7 @@ export default class AbnormalDrawer extends Component { const { loading } = this.props; const rowSelection = { selectedRowKeys, - onChange: this.onSelectChange, + onChange: this.onSelectChange }; return ( - + title={`${getLabel(111, "提示")}: ${getLabel(111, "核算范围内人员福利项目在福利方案中开启缴纳但核算数值为0的进行异常统计")};${getLabel(111, "点击忽略")},${getLabel(111, "视为该数据主观判断为非异常数据")},${getLabel(111, "导出档案只导出异常数据")},${getLabel(111, "点击核算也不再重新核算")}。`} + > + - - + + - 忽略全部 - 取消全部忽略 + {getLabel(111, "忽略全部")} + {getLabel(111, "取消全部忽略")} }> - +
{/* table */} @@ -62,10 +65,10 @@ export default class AbnormalDrawer extends Component { loading={loading} pagination={{ onChange: (value) => { -this.props.onPageChange(value) -}, + this.props.onPageChange(value); + }, total: this.props.total, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}` }} rowSelection={rowSelection} scroll={{ x: 1200 }} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/accountDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/accountDialog.js index 6daf854d..f7409b49 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/accountDialog.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/accountDialog.js @@ -6,12 +6,14 @@ */ import React, { Component } from "react"; import { Button, Form, Input } from "antd"; -import { WeaDatePicker, WeaDialog, WeaSelect } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaLocaleProvider, WeaSelect } from "ecCom"; import "./index.less"; const createForm = Form.create; const FormItem = Form.Item; +const getLabel = WeaLocaleProvider.getLabel; + class Accountdialog extends Component { constructor(props) { super(props); @@ -46,36 +48,36 @@ class Accountdialog extends Component { type="primary" onClick={this.handleSubmit} loading={this.props.loading}> - 保存并进入核算 + {getLabel(111, "保存并进入核算")} ]}>
- + {/* { this.props.isAdmin && */} - + {/* } */} - + { const { billStatus, billMonth, creator } = r; return ( - {billStatus === "未归档" && ( + {billStatus === getLabel(111, "未归档") && ( this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}> - 核算 + {getLabel(111, "核算")} )} - {billStatus === "已归档" && ( + {billStatus === getLabel(111, "已归档") && ( this.socialSecurityBenefitsRecalculate({ id: r.id })}> - 重新核算 + {getLabel(111, "重新核算")} )} - {billStatus === "未归档" && ( + {billStatus === getLabel(111, "未归档") && ( - 归档 + {getLabel(111, "归档")} {/* 异常详情 */} - 删除 + {getLabel(111, "删除")} {/* 操作日志 */} }> )} - {billStatus === "已归档" && ( + {billStatus === getLabel(111, "已归档") && ( - 查看 + {getLabel(111, "查看")} }> @@ -219,7 +220,7 @@ export default class StandingBook extends React.Component { socialSecurityBenefitsRecalculate = (params) => { const { socialSecurityBenefitsRecalculate } = this.props.standingBookStore; socialSecurityBenefitsRecalculate(params).then(() => { - message.success("重新核算成功"); + message.success(getLabel(111, "重新核算成功")); this.init(); }).catch(err => { message.error(err); @@ -271,8 +272,8 @@ export default class StandingBook extends React.Component { switch (key) { case "archive": Modal.confirm({ - title: "确认信息", - content: "确认要归档吗?", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确认要归档吗")}?`, onOk: () => { siaccountFile({ billMonth, paymentOrganization: paymentOrganizationId }).then((res) => { const { current } = this.state; @@ -288,19 +289,19 @@ export default class StandingBook extends React.Component { this.setState({ drawerProps: { ...this.state.drawerProps, - title: "核算异常", + title: getLabel(111, "核算异常"), visible: true } }); break; case "delete": Modal.confirm({ - title: "确认信息", - content: "确认删除本条数据吗?", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确认删除本条数据吗")}?`, confirmLoading: deleteLoading, onOk: () => { siaccountDelete({ billMonth, paymentOrganization: paymentOrganizationId }).then(() => { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.getCommonList({ ...this.state.tableParams, current: this.state.current @@ -350,7 +351,7 @@ export default class StandingBook extends React.Component { progressVisible: false, progress: 0 }, () => { - message.success("核算成功"); + message.success(getLabel(111, "核算成功")); this.handleClose(); this.getCommonList({ ...this.state.tableParams, @@ -432,18 +433,19 @@ export default class StandingBook extends React.Component { this.setState({ dialogProps: { ...this.state.dialogProps, - title: "核算", + title: getLabel(111, "核算"), visible: true } }); }}> - 核算 + {getLabel(111, "核算")} ]; const pagination = { + ...this.pageInfo, total: total, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showSizeChanger: true, showQuickJumper: true, @@ -460,13 +462,13 @@ export default class StandingBook extends React.Component { return (
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 buttons={showOperateBtn ? rightBtns : []} >
-
账单月份:
+
{getLabel(111, "账单月份")}:
this.handleChangeMonth("startTime", val)} /> - + {getLabel(111, "至")} Date: Fri, 14 Apr 2023 14:21:23 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/progressModal/index.js | 5 +- .../standingBookDetail/components/normal.js | 47 ++++++++++--------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/pc4mobx/hrmSalary/components/progressModal/index.js b/pc4mobx/hrmSalary/components/progressModal/index.js index cf05a2aa..795df718 100644 --- a/pc4mobx/hrmSalary/components/progressModal/index.js +++ b/pc4mobx/hrmSalary/components/progressModal/index.js @@ -1,10 +1,11 @@ import React from "react"; import { Modal } from "antd"; -import { WeaProgress } from "ecCom"; +import { WeaProgress, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export default class ProgressModal extends React.Component { render() { - const { title = "正在核算请稍后" } = this.props; + const { title = getLabel(111, "正在核算请稍后") } = this.props; return (
{ - message.success("添加成功"); + message.success(getLabel(111, "添加成功")); this.getNormalList({ billMonth, paymentOrganization, @@ -229,7 +230,7 @@ export default class NormalIndex extends Component { paymentOrganization }; siaccountSupplementarySave(payload).then(() => { - message.success("添加成功"); + message.success(getLabel(111, "添加成功")); this.getSupplementaryList({ billMonth, current: this.state.current, @@ -290,7 +291,7 @@ export default class NormalIndex extends Component { const { selectedRowKeys } = this.state; const { billMonth, selectedKey, paymentOrganization } = this.props; if (_.isEmpty(selectedRowKeys)) { - message.warning("未勾选数据!"); + message.warning(getLabel(111, "未勾选数据")); } else { const includes = _.map( _.filter(list, it => selectedRowKeys.includes(it.id)), @@ -301,8 +302,8 @@ export default class NormalIndex extends Component { item => item.id ); Modal.confirm({ - title: "确认信息", - content: "确认删除勾选的数据吗?", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确认删除勾选的数据吗")}?`, onOk: () => { this.setState({ progressVisible: true @@ -318,7 +319,7 @@ export default class NormalIndex extends Component { progressVisible: false, progress: 0 }, () => { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); selectedKey === "1" ? this.getNormalList({ billMonth, @@ -342,7 +343,7 @@ export default class NormalIndex extends Component { paymentOrganization }).then(() => { clearInterval(this.timerDelete); - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.setState({ selectedRowKeys: [], progressVisible: false, progress: 0 }); selectedKey === "1" ? this.getNormalList({ @@ -367,7 +368,7 @@ export default class NormalIndex extends Component { this.setState({ addProps: { ...this.state.addProps, - title: "添加缴纳人员", + title: getLabel(111, "添加缴纳人员"), visible: true } }); @@ -401,7 +402,7 @@ export default class NormalIndex extends Component { progressVisible: false, progress: 0 }, () => { - message.success("核算成功"); + message.success(getLabel(111, "核算成功")); selectedKey === "1" ? this.getNormalList({ billMonth, @@ -484,8 +485,8 @@ export default class NormalIndex extends Component {
- 账单月份 - + {getLabel(111, "账单月份")} + @@ -494,7 +495,7 @@ export default class NormalIndex extends Component {
- 备注: + {getLabel(111, "备注")}: {remarks} @@ -504,14 +505,14 @@ export default class NormalIndex extends Component {
{this.props.type !== "detail" && this.props.selectedKey == "3" ? - + - + @@ -539,7 +540,7 @@ export default class NormalIndex extends Component { + }}>{getLabel(111, "核算")} + }}>{getLabel(111, "调差")} } { @@ -555,12 +556,12 @@ export default class NormalIndex extends Component { + }}>{getLabel(111, "线下对比")} } {/*核算进度条*/} { this.setState({ progressVisible: false, progress: 0 }); @@ -569,7 +570,7 @@ export default class NormalIndex extends Component { /> { this.props.type !== "detail" && - + } - + { this.setState({ searchValue: value }); }} - placeholder={"请输入姓名"} + placeholder={getLabel(111, "请输入姓名")} onSearch={value => { this.handleSearch(value); }} From 3bec34092fe8d8877daec556b71f17faecc2992f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 14 Apr 2023 15:26:51 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/normal.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 2d9d3123..bbc3c8f1 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -157,8 +157,12 @@ export default class NormalIndex extends Component { const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum } = this.state; const { list: dataSource, total, columns } = tableData; const pageInfo = { current, pageSize, total }; + const i18n = { + "总计": "total", "编辑": getLabel(111, "编辑"), + "操作": getLabel(111, "操作"), "姓名": getLabel(111, "姓名") + }; childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, pageInfo, + dataSource, columns, pageInfo, i18n, selectedRowKeys, showSum, siaccountSum, showOperates: !getQueryString("type") }), "*"); @@ -486,7 +490,8 @@ export default class NormalIndex extends Component {
{getLabel(111, "账单月份")} - + From d326b840312c0f7dce77717ced51f19a92e82ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 14 Apr 2023 17:30:34 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importModal/acctResultImportModal.js | 14 ++--- .../importModal/selectFieldModal.js | 15 +++--- .../pages/calculateDetail/compareDetail.js | 23 ++++---- .../components/abnormalList.js | 14 ++--- .../components/adjustmentSlide.js | 19 +++---- .../components/businessAccounting.js | 10 ++-- .../components/inputPaymentAmount.js | 15 +++--- .../components/makeupDifference.js | 12 +++-- .../standingBookDetail/components/normal.js | 7 +-- .../standingBookDetail/components/overView.js | 11 ++-- .../components/regAddEmployee.js | 33 ++++++------ .../components/regEditDetial.js | 23 ++++---- .../standingBookDetail/components/regList.js | 10 +++- .../standingBookDetail/components/regTop.js | 30 ++++++----- .../components/regression.js | 54 ++++++++++--------- .../components/supplementarySlide.js | 54 ++++++++++--------- .../standingBookDetail/constant.js | 41 +++++++------- .../condition.js | 11 ++-- .../standingBookOfflineComparison/index.js | 25 ++++----- 19 files changed, 229 insertions(+), 192 deletions(-) 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) => { From 9ace8c8813c0702b4a2c8e814f66a5cec92bcc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 17 Apr 2023 09:54:03 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 10 +- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 115 +++++++++--------- pc4mobx/hrmSalary/pages/salaryItem/index.js | 48 ++++---- .../pages/salaryItem/systemSalaryItemModal.js | 9 +- .../standingBook/index.js | 2 +- 5 files changed, 96 insertions(+), 88 deletions(-) diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index b59a534a..79a1f799 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -37,12 +37,12 @@ import stores from "./stores"; import "./style/index"; // 读取系统多语言配置 -let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "hrmSalary"); +let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "HRM"); // 不需要读取系统多语言 -getLocaleLabel = function (nextState, replace, callback) { - callback(); -}; +// getLocaleLabel = function (nextState, replace, callback) { +// callback(); +// }; const Home = (props) => props.children; @@ -105,6 +105,8 @@ const Routes = ( /> + + {/*系统语言改造截止处*/} { return (); }; @@ -80,8 +81,8 @@ export default class SalaryItem extends React.Component { handleDeleteItem(record) { const { salaryItemStore: { deleteItemRequest, getTableDatas } } = this.props; Modal.confirm({ - title: "信息确认", - content: "确认删除该条数据吗?", + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确认删除该条数据吗")}?`, onOk: () => { deleteItemRequest([record.id]).then(() => { getTableDatas({ ...this.state.searchParams }).then(res => { @@ -123,12 +124,12 @@ export default class SalaryItem extends React.Component { }); columns.push({ key: "operate", - title: "操作", + title: getLabel(111, "操作"), render: (text, record) => { return ( { this.onEditItem(record, true); - }}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"} + }}>{(showSalaryItemBtn || showOperateBtn) ? getLabel(111, "编辑") : getLabel(111, "查看")} ); } }); @@ -143,7 +144,7 @@ export default class SalaryItem extends React.Component { { this.handleDeleteItem(record); - }}>删除 + }}>{getLabel(111, "删除")} }> - 系统薪资项 - 自定义薪资项 + {getLabel(111, "系统薪资项")} + {getLabel(111, "自定义薪资项")} ); @@ -246,7 +247,8 @@ export default class SalaryItem extends React.Component { return (
{ (showOperateBtn || showSalaryItemBtn) && - 新增 + {getLabel(111, "新增")} } { (showOperateBtn || showSalaryItemBtn) && @@ -255,12 +257,12 @@ export default class SalaryItem extends React.Component { style={{ marginRight: "10px" }} onClick={() => { if (!selectedRowKeys.length) { - message.info("未选中任何数据!"); + message.info(getLabel(111, "未选中任何数据")); return; } Modal.confirm({ - title: "信息确认", - content: `确定要将所选的薪资项(共${selectedRowKeys.length}条数据)删除吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定要将所选的薪资项")}(${getLabel(111, "共")}${selectedRowKeys.length})${getLabel(111, "条数据")}${getLabel(111, "删除吗")}?`, onOk: () => { deleteItemRequest(selectedRowKeys).then(() => { getTableDatas({ ...this.state.searchParams }).then(res => { @@ -275,9 +277,9 @@ export default class SalaryItem extends React.Component { }); } }); - }}>批量删除薪资项 + }}>{getLabel(111, "批量删除薪资项")} } - { + { this.setState({ searchValue: value }); }} onSearch={(value) => { this.handleSearch(value); @@ -292,8 +294,8 @@ export default class SalaryItem extends React.Component { const { name, sharedType, taxAgentIds } = request; if (!name || (sharedType === "1" && !taxAgentIds)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "必要信息不完整,红色*为必填项")}!` }); return; } @@ -315,16 +317,16 @@ export default class SalaryItem extends React.Component { arrList = [ , + }}>{getLabel(111, "保存")}, + }}>{getLabel(111, "保存并继续创建")} ]; } else if (this.state.editable) { arrList = [ + }}>{getLabel(111, "保存")} ]; } return arrList; @@ -344,7 +346,7 @@ export default class SalaryItem extends React.Component { return (
} iconBgcolor="#F14A2D" showDropIcon={false} @@ -399,7 +401,7 @@ export default class SalaryItem extends React.Component { direction={"right"} title={ { handleAdd(); }} - >添加 + >{getLabel(111, "添加")} ]} >
{ this.handleSearchChange(value); }} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index a3ad1e83..6a6ba087 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -462,7 +462,7 @@ export default class StandingBook extends React.Component { return (
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 buttons={showOperateBtn ? rightBtns : []} From b0d176d91171ba700a85724a1153c0611212c22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 17 Apr 2023 14:36:56 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 138 +++++++++--------- .../standingBook/index.js | 2 +- 2 files changed, 71 insertions(+), 69 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 5655e499..c4713c72 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -14,6 +14,7 @@ import { WeaFormItem, WeaHelpfulTip, WeaInput, + WeaLocaleProvider, WeaNewScroll, WeaPopoverHrm, WeaSearchGroup, @@ -34,6 +35,7 @@ import ChangeSalaryModal from "../salaryFile/changeSalaryModal"; import "./index.less"; import UnifiedTable from "../../components/UnifiedTable"; +const getLabel = WeaLocaleProvider.getLabel; const WeaTableComx = WeaTableNew.WeaTable; @inject("payrollFilesStore", "taxAgentStore", "salaryFileStore") @@ -218,21 +220,21 @@ class Index extends Component { allGotoFixed = () => { const { pageInfo } = this.state; if (pageInfo.total === 0) { - message.warning("您没有需要处理的待定薪人员!"); + message.warning(getLabel(111, "您没有需要处理的待定薪人员!")); return; } Modal.warning({ - title: "信息确认", - content: `确定要将所有待定薪人员(共${pageInfo.total}条数据)设为发薪人员吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定要将所有待定薪人员")}(${getLabel(111, "共")}${pageInfo.total}${getLabel(111, "条数据")})${getLabel(111, "设为发薪人员吗")}?`, onOk: () => { API.allGotoFixed({}).then(({ status, data, errormsg }) => { if (status) { const { msg } = data; - message.info(msg || "操作成功!"); + message.info(msg || getLabel(111, "操作成功")); this.queryTabTotal(); this.query(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } @@ -254,11 +256,11 @@ class Index extends Component { cancelStop = (id) => { API.cancelStop([id]).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.queryTabTotal(); this.query(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -266,7 +268,7 @@ class Index extends Component { deletePendingTodo = (params) => { API.deletePendingTodo(params).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.setState({ selectedRowKeys: [] }, () => { @@ -274,7 +276,7 @@ class Index extends Component { this.query(); }); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -282,7 +284,7 @@ class Index extends Component { deleteSuspendTodo = (params) => { API.deleteSuspendTodo(params).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.setState({ selectedRowKeys: [] }, () => { @@ -290,14 +292,14 @@ class Index extends Component { this.queryTabTotal(); }); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; handleClick = ({ key }) => { const { selectedRowKeys } = this.state; if (selectedRowKeys.length === 0) { - message.warning("请选择表格数据"); + message.warning(getLabel(111, "请选择表格数据")); return; } if (key === "batchDelete") { @@ -306,7 +308,7 @@ class Index extends Component { API.gotoFixed(selectedRowKeys).then(({ status, data, errormsg }) => { if (status) { if (data.type === "success") { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.setState({ selectedRowKeys: [] }, () => { @@ -317,7 +319,7 @@ class Index extends Component { message.info(data.msg); } } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } @@ -329,24 +331,24 @@ class Index extends Component { return [ , + }}>{getLabel(111, "导入")}, }> - , - , + , - 批量设为发薪员工 - 批量删除待办 + {getLabel(111, "批量设为发薪员工")} + {getLabel(111, "批量删除待办")} } > - @@ -367,14 +369,14 @@ class Index extends Component { this.setState({ selectedRowKeys: [] }); }}/> }> - , }> - @@ -393,7 +395,7 @@ class Index extends Component { }} /> }> - @@ -401,17 +403,17 @@ class Index extends Component { , + }}>{getLabel(111, "批量删除待办")}, , + }}>{getLabel(111, "导入")}, }> - @@ -429,14 +431,14 @@ class Index extends Component { }} /> }> - , }> - @@ -471,45 +473,45 @@ class Index extends Component { render: (text, record) => { if (!showOperateBtn) { return ; } else { if (selectedKey === "pending") { return
- this.handleEdit(record)}>编辑 + this.handleEdit(record)}>{getLabel(111, "编辑")} this.handleMenuClick(e, record.id)}> - 设为发薪人员 - 删除待办 + {getLabel(111, "设为发薪人员")} + {getLabel(111, "删除待办")} } title="">
; } else if (selectedKey === "fixed") { - return this.handleEdit(record)}>调薪; + return this.handleEdit(record)}>{getLabel(111, "调薪")}; } else if (selectedKey === "suspend") { return
- this.handleEdit(record)}>编辑 + this.handleEdit(record)}>{getLabel(111, "编辑")} this.handleMenuClick(e, record.id)}> - 停薪 - 删除待办 + {getLabel(111, "停薪")} + {getLabel(111, "删除待办")} } title="">
; } else { return
- this.cancelStop(record.id)}>取消停薪 + this.cancelStop(record.id)}>{getLabel(111, "取消停薪")} this.handleMenuClick(e, record)}> - 查看 + {getLabel(111, "查看")} } title=""> @@ -544,20 +546,20 @@ class Index extends Component { //设为定薪员工 API.gotoFixed([id]).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.query(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } else if (key === "stopSalary") { //停薪 API.gotoStop([id]).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.query(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } else if (key === "deletePendingTodo") { @@ -578,14 +580,14 @@ class Index extends Component { arrList.push(); + }}>{getLabel(111, "发起调薪")}); } if (showOperateBtn && selectedKey === "fixed") { arrList.push(); + }}>{getLabel(111, "调薪")}); } - selectedKey !== "stop" && arrList.push(); + selectedKey !== "stop" && arrList.push(); return arrList; }; //切换tab @@ -614,8 +616,8 @@ class Index extends Component { const { salaryFileStore: { adjustSalaryItems, detailForm } } = this.props; if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey === "suspend" && _.isEmpty(paysetParams.payEndDate))) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -630,10 +632,10 @@ class Index extends Component { }; API.savePaySet(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); this.query(); } else { - message.error(errormsg || "保存失败!"); + message.error(errormsg || getLabel(111, "保存失败")); } }); }; @@ -641,9 +643,9 @@ class Index extends Component { handleSetpay = (params) => { const { type, date } = params; const { paysetParams } = this.state; - if (type === "起始发薪日期") { + if (type === getLabel(111, "起始发薪日期")) { this.setState({ paysetParams: { ...paysetParams, payStartDate: date } }); - } else if (type === "最后发薪日期") { + } else if (type === getLabel(111, "最后发薪日期")) { this.setState({ paysetParams: { ...paysetParams, payEndDate: date } }); } }; @@ -683,7 +685,7 @@ class Index extends Component { current: pageInfo.current, pageSize: pageInfo.pageSize, total: pageInfo.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -700,15 +702,15 @@ class Index extends Component { }; const renderSearch = () => { const searchItems = [ - { com: this.Input("姓名", "username") }, - { com: this.Browser("分部", "subcompanyIds") }, - { com: this.Browser("部门", "departmentIds") }, - { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("人员状态", "userstatus") }, - // { com: this.Select("档案状态", "archiveStatus") }, - { com: this.Select("个税扣缴义务人", "taxAgentId") } + { com: this.Input(getLabel(111, "姓名"), "username") }, + { com: this.Browser(getLabel(111, "分部"), "subcompanyIds") }, + { com: this.Browser(getLabel(111, "部门"), "departmentIds") }, + { com: this.Browser(getLabel(111, "岗位"), "positionIds") }, + { com: this.Select(getLabel(111, "人员状态"), "userstatus") }, + // { com: this.Select(getLabel(111, "档案状态")"", "archiveStatus") }, + { com: this.Select(getLabel(111, "个税扣缴义务人"), "taxAgentId") } ]; - return ; + return ; }; const adBtn = [ // 高级搜索内部按钮 @@ -721,7 +723,7 @@ class Index extends Component { pageSize: 10 } }, () => this.query()); - }}> 搜索 , + }}> {getLabel(111, "搜索")} , , - + })}> {getLabel(111, "重置")} , + ]; const rowSelection = { selectedRowKeys, @@ -741,7 +743,7 @@ class Index extends Component { { key: "BTN_COLUMN", icon: , - content: "显示列定制", + content: getLabel(111, "显示列定制"), onClick: () => { tableStore.setColSetVisible(true); tableStore.tableColSet(true); @@ -751,7 +753,7 @@ class Index extends Component { return (
} + title={getLabel(111, "薪资档案")} icon={} iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={rightMenu} > @@ -781,7 +783,7 @@ class Index extends Component { this.query(); }); }} // 点搜索按钮时的回调this.handleSearch() - searchsBasePlaceHolder={"请输入姓名"} + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} onSearchChange={(v) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, @@ -832,7 +834,7 @@ class Index extends Component { direction="right" title={ diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 6a6ba087..a3ad1e83 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -462,7 +462,7 @@ export default class StandingBook extends React.Component { return (
} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 buttons={showOperateBtn ? rightBtns : []} From c2b659681bf08d1eca7819201eabe2dd7cade7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 13:27:04 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payrollFiles/components/importMenu.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 74dd4b0e..bd23c3d9 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -1,9 +1,12 @@ import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; import ImportModal from "../../../components/importModal"; import * as API from "../../../apis/payrollFiles"; import { Menu, Modal } from "antd"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class ImportMenu extends Component { constructor(props) { super(props); @@ -26,7 +29,7 @@ class ImportMenu extends Component { params.listType = "FIXED"; } else { params.listType = this.state.importParams.importType; - params.importType = ''; + params.importType = ""; } API.salaryArchivePreview(params).then(({ status, data }) => { if (status) { @@ -54,8 +57,8 @@ class ImportMenu extends Component { const { key } = e; if (key === "init") { Modal.confirm({ - title: "信息确认", - content: `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`, + title: getLabel(111, "信息确认"), + content: getLabel(111, `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`), onOk: () => { this.setState({ importParams: { @@ -96,7 +99,7 @@ class ImportMenu extends Component { params.importType = this.state.importParams.importType; params.listType = "FIXED"; } else { - params.importType = ''; + params.importType = ""; params.listType = this.state.importParams.importType; } API.importSalaryArchive(params).then(({ status, data }) => { From 2194640fce0694f1ddea123c3fee03c174d5fb0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 14:00:08 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=C2=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/appConfig/index.js | 19 ++- .../pages/dataAcquisition/cumDeduct/index.js | 92 ++++++----- .../pages/dataAcquisition/dataTables.js | 15 +- .../payrollFiles/components/allWithoutPay.js | 27 +-- .../components/batchSuspendsPay.js | 11 +- .../payrollFiles/components/exportMenu.js | 11 +- .../pages/salaryFile/changeSalaryModal.js | 28 ++-- .../pages/salaryFile/salaryItemChangeList.js | 18 +- .../pages/salaryFile/saralyFileViewSlide.js | 31 ++-- .../pages/salaryFile/taxAgentChangeList.js | 154 +++++++++--------- 10 files changed, 218 insertions(+), 188 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js index a7b3d7ce..005fa6a7 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/index.js +++ b/pc4mobx/hrmSalary/pages/appConfig/index.js @@ -5,11 +5,12 @@ * Date: 2022-09-27 18:17:02 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom"; import * as API from "../../apis/ruleconfig"; import { Button, message } from "antd"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const Input = (props) => { const { label, value } = props; return ( @@ -55,10 +56,10 @@ class AppConfig extends Component { API.appSettingSave({ openAcctResultSum, displayEmpInfoReport }).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("设置成功!"); + message.success(getLabel(111, "设置成功")); this.queryAppsetting(); } else { - message.error(errormsg || "设置失败!"); + message.error(errormsg || getLabel(111, "设置失败")); } }); }; @@ -69,13 +70,13 @@ class AppConfig extends Component { const items = [ { com: Input({ - label: "版本号", + label: getLabel(111, "版本号"), value: version }) }, { com: CheckBox({ - label: "显示薪资核算结果合计列", + label: getLabel(111, "显示薪资核算结果合计列"), value: openAcctResultSum, onChange: (openAcctResultSum) => { this.setState({ openAcctResultSum }); @@ -84,7 +85,7 @@ class AppConfig extends Component { }, { com: CheckBox({ - label: "是否显示脱敏表人员信息", + label: getLabel(111, "是否显示脱敏表人员信息"), value: displayEmpInfoReport, onChange: (displayEmpInfoReport) => { this.setState({ displayEmpInfoReport }); @@ -93,14 +94,14 @@ class AppConfig extends Component { }, { com: CheckBox({ - label: "是否输出日志", + label: getLabel(111, "是否输出日志"), disabled: true, value: isLog }) }, { com: CheckBox({ - label: "是否可编辑系统公式", + label: getLabel(111, "是否可编辑系统公式"), disabled: true, value: openFormulaForcedEditing }) @@ -109,7 +110,7 @@ class AppConfig extends Component { return (
应用设置} + title={{getLabel(111, "应用设置")}} icon={} iconBgcolor="#F14A2D" buttons={btns} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 0e106ae3..0d905108 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -1,6 +1,14 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDatePicker, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom"; +import { + WeaDatePicker, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect +} from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { autoAddAll, @@ -23,6 +31,8 @@ import { convertToUrlString } from "../../../util/url"; import Layout from "../layout"; import moment from "moment"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore", "cumDeductStore") @observer class Index extends Component { @@ -77,10 +87,10 @@ class Index extends Component { autoAddAll({ yearMonth: declareMonth }).then(({ status, data, errormsg }) => { this.setState({ addAllLoading: false }); if (status) { - message.success(data || "操作成功"); + message.success(data || getLabel(111, "操作成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }).catch(() => this.setState({ addAllLoading: false })); }; @@ -109,15 +119,15 @@ class Index extends Component { const { declareMonth, taxAgentId } = this.state; const payload = { declareMonth, taxAgentId }; Modal.confirm({ - title: "信息确认", - content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定清空税款所属期为")}${declareMonth}${getLabel(111, "的所有累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteAllAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -134,22 +144,22 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { id, departmentName, username } = record; if (ids.length === 0 && !id) { - message.warning("请选择表格数据"); + message.warning(getLabel(111, "请选择表格数据")); return; } const payload = { declareMonth, ids: !id ? ids : [id] }; Modal.confirm({ - title: "信息确认", - content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" : - `确定删除${departmentName}${username}(税款所属期:${declareMonth})的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") : + `${getLabel(111, "确定删除")}${departmentName}${username}(${getLabel(111, "税款所属期")}:${declareMonth})${getLabel(111, "的累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); this.tableRef.handleClearRows(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -179,7 +189,7 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { declareMonth, taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } this.setState({ @@ -218,7 +228,7 @@ class Index extends Component { importPayload: { ...importPayload, slideDataSource: preview } }); } else { - message.error(errormsg || "预览失败"); + message.error(errormsg || getLabel(111, "预览失败")); } }); }; @@ -237,22 +247,22 @@ class Index extends Component { editAddUpDeduction({ ...payload, id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("编辑成功"); + message.success(getLabel(111, "编辑成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "编辑失败"); + message.error(errormsg || getLabel(111, "编辑失败")); } }); } else { createAddUpDeduction(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } @@ -263,8 +273,8 @@ class Index extends Component { const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v); if (!bool) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -281,7 +291,7 @@ class Index extends Component { * Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位 * Date: 2023/2/20 */ - handleAddData = (title = "新建", editId = {}) => { + handleAddData = (title = getLabel(111, "新建"), editId = {}) => { const { taxAgentStore, cumDeductStore: { addForm } } = this.props; const { slidePayload } = this.state; const { taxAgentOption } = taxAgentStore; @@ -320,7 +330,7 @@ class Index extends Component { handleTableOperate = ({ key }, record) => { const { id } = record; key === "handleAddData" ? getAddUpDeduction({ id }).then(({ status, data }) => { - if (status) this[key]("编辑", data); + if (status) this[key](getLabel(111, "编辑"), data); }) : this[key](record); }; handleCloseSlide = () => { @@ -349,7 +359,7 @@ class Index extends Component { const items = [ { com: DataCollectionDatePicker({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), value: declareMonth, onChange: this.screenChange, key: "declareMonth" @@ -357,10 +367,10 @@ class Index extends Component { }, { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: taxAgentId, onChange: this.screenChange, - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], key: "taxAgentId" }) } @@ -385,20 +395,20 @@ class Index extends Component { getTopBtns = () => { const { addAllLoading } = this.state; return [ - , - , - , + , + , + , - 批量删除 - 一键清空 - 导出选中 - 导出全部 + {getLabel(111, "批量删除")} + {getLabel(111, "一键清空")} + {getLabel(111, "导出选中")} + {getLabel(111, "导出全部")} } > - + ]; }; @@ -414,10 +424,10 @@ class Index extends Component { - 导出选中 + {getLabel(111, "导出选中")} } type="primary"> - 导出全部 + {getLabel(111, "导出全部")} ]; }; @@ -439,7 +449,7 @@ class Index extends Component { handleExportSelectDetail = () => { const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, ""); @@ -506,7 +516,7 @@ class Index extends Component { } = this.state; const tablePayload = { declareMonth: [declareMonth], taxAgentId }; return ( - this.handleAddData("累计专项附加扣除记录", record)} + onViewDetails={(record) => this.handleAddData(getLabel(111, "累计专项附加扣除记录"), record)} form={form} /> @@ -536,7 +546,7 @@ export default Index; export const DataCollectionDatePicker = (props) => { const { value, label, onChange, format = "YYYY-MM", key, screen = true, - tip = "提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额", + tip = getLabel(111, "提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额"), labelCol = 8, wrapperCol = 16 } = props; return @@ -568,7 +578,7 @@ export const DataCollectionDateRangePick = (props) => { return current && value2 && current.getTime() > new Date(value2).getTime(); }} /> - + {getLabel(111, "至")} onChange({ key, value: [value1, val] })} format={format} disabledDate={(current) => { diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js index 579cb872..dd1dddec 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js @@ -8,6 +8,9 @@ import React, { Component } from "react"; import UnifiedTable from "../../components/UnifiedTable"; import { getTableDate } from "../../apis/cumDeduct"; import { Menu, Popover } from "antd"; +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; class DataTables extends Component { constructor(props) { @@ -63,7 +66,7 @@ class DataTables extends Component { }; const pagination = { ...pageInfo, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showSizeChanger: true, showQuickJumper: true, @@ -106,15 +109,15 @@ class DataTables extends Component { { !isSpecial && - onViewDetails(record)}>查看明细 + onViewDetails(record)}>{getLabel(111, "查看明细")} { showOperateBtn && onTableOperate(e, record)}> - 编辑 - 删除 + {getLabel(111, "编辑")} + {getLabel(111, "删除")} } title=""> @@ -128,9 +131,9 @@ class DataTables extends Component { showOperateBtn && onTableOperate({ key: "handleAddData" }, record)}>编辑 + onClick={() => onTableOperate({ key: "handleAddData" }, record)}>{getLabel(111, "编辑")} onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除 + onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>{getLabel(111, "删除")} } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js index c9d85ff8..ab212764 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js @@ -1,41 +1,44 @@ import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; import * as API from "../../../apis/payrollFiles"; import { Menu, message, Modal } from "antd"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class AllWithoutPay extends Component { handleClick = ({ key }) => { const { selectedRowKeys = [], refreshList } = this.props; if (key === "batchWithoutpay") { if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); refreshList(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); - }else{ + } else { const { pageInfo } = this.props; if (pageInfo.total === 0) { - message.warning("您没有需要处理的待停薪人员!"); + message.warning(getLabel(111, "您没有需要处理的待停薪人员!")); return; } Modal.warning({ - title: "信息确认", - content: `确定要将所有待停薪人员(共${pageInfo.total}条数据)设为停薪人员吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定要将所有待停薪人员")}(${getLabel(111, "共")}${pageInfo.total}${getLabel(111, "条数据")})${getLabel(111, "设为停薪人员吗")}?`, onOk: () => { API.allGotoStop({}).then(({ status, data, errormsg }) => { if (status) { - const { msg }= data; - message.info(msg || "操作成功!"); + const { msg } = data; + message.info(msg || getLabel(111, "操作成功")); refreshList(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); } @@ -46,8 +49,8 @@ class AllWithoutPay extends Component { render() { return ( - 全部停薪 - 批量停薪 + {getLabel(111, "全部停薪")} + {getLabel(111, "批量停薪")} ); } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js index 6e524fba..3edd91d5 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js @@ -1,21 +1,24 @@ import React, { Component } from "react"; import { Menu, message } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import * as API from "../../../apis/payrollFiles"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class BatchSuspendpay extends Component { handleClick = ({ key }) => { const { selectedRowKeys, refreshList } = this.props; if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } API.cancelStop(selectedRowKeys).then(({ status, errormsg }) => { if (status) { - message.success("操作成功!"); + message.success(getLabel(111, "操作成功")); refreshList(); } else { - message.error(errormsg || "操作失败!"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -23,7 +26,7 @@ class BatchSuspendpay extends Component { render() { return ( - 批量取消停薪 + {getLabel(111, "批量取消停薪")} ); } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js index 78a36b27..c28d48b2 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js @@ -1,7 +1,10 @@ import React, { Component } from "react"; import { Menu, message } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class ExportMenu extends Component { componentDidMount() { } @@ -21,7 +24,7 @@ class ExportMenu extends Component { runStatusList = _.upperCase(selectedKey); break; case "stop": - runStatusList = 'STOP_FROM_PENDING,STOP_FROM_SUSPEND'; + runStatusList = "STOP_FROM_PENDING,STOP_FROM_SUSPEND"; break; default: break; @@ -37,7 +40,7 @@ class ExportMenu extends Component { handleExportSelect = () => { const { selectedRowKeys } = this.props; if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`; @@ -47,8 +50,8 @@ class ExportMenu extends Component { render() { return ( - 导出全部 - 导出选中 + {getLabel(111, "导出全部")} + {getLabel(111, "导出选中")} ); } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js b/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js index 6a3260fe..bd319178 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js @@ -1,10 +1,11 @@ import React from "react"; import { Button, Col, message, Row } from "antd"; -import { WeaDatePicker, WeaDialog, WeaInput, WeaSelect, WeaTable } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaInput, WeaLocaleProvider, WeaSelect, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import moment from "moment"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("salaryFileStore") @observer export default class ChangeSalaryModal extends React.Component { @@ -165,11 +166,14 @@ export default class ChangeSalaryModal extends React.Component { // 保存 handleSave() { - const { salaryFileStore: { saveSalaryItem, editSingleSalaryItem, fetchSingleSalaryItemList, getArchiveForm }, recordId } = this.props; + const { + salaryFileStore: { saveSalaryItem, editSingleSalaryItem, fetchSingleSalaryItemList, getArchiveForm }, + recordId + } = this.props; let saveRequest = { ...this.state.request }; const { salaryArchiveItems, canOperator } = this.state; if (salaryArchiveItems.length === 0) { - message.warning("请添加调薪明细"); + message.warning(getLabel(111, "请添加调薪明细")); return; } saveRequest.salaryArchiveItems = salaryArchiveItems.map(item => { @@ -202,7 +206,7 @@ export default class ChangeSalaryModal extends React.Component { const { selectedRowKeys, salaryArchiveItems } = this.state; let result = [...salaryArchiveItems]; if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); } this.setState({ @@ -221,7 +225,7 @@ export default class ChangeSalaryModal extends React.Component { }; return ( { this.handleSave(); - }}>保存]} + }}>{getLabel(111, "保存")}]} >
- 生效日期 + {getLabel(111, "生效日期")} - 调整原因 + {getLabel(111, "调整原因")} - 说明 + {getLabel(111, "说明")}
- 调薪明细 + {getLabel(111, "调薪明细")} { !recordId &&
@@ -295,14 +299,14 @@ export default class ChangeSalaryModal extends React.Component { onClick={() => { this.handleRemoveClick(); }} - > + > + >
}
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index 49d82cd8..b08bc557 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -1,10 +1,12 @@ import React from "react"; import { Menu, message, Modal, Popover } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import { inject, observer } from "mobx-react"; import ChangeSalaryModal from "./changeSalaryModal"; import { deleteSalaryItem } from "../../apis/archive"; import UnifiedTable from "../../components/UnifiedTable"; +const getLabel = WeaLocaleProvider.getLabel; @inject("salaryFileStore") @observer export default class SalaryItemChangeList extends React.Component { @@ -34,17 +36,17 @@ export default class SalaryItemChangeList extends React.Component { }; deleteSalaryItem = (salaryArchiveItemId) => { Modal.confirm({ - title: "信息确认", - content: "是否删除该调整数据", + title: getLabel(111, "信息确认"), + content: getLabel(111, "是否删除该调整数据"), onOk: () => { const { salaryFileStore: { fetchSingleSalaryItemList } } = this.props; deleteSalaryItem({ salaryArchiveItemId }).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.searchParams = { salaryArchiveId: this.props.id, current: 1 }; fetchSingleSalaryItemList(this.searchParams); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); }, @@ -62,15 +64,15 @@ export default class SalaryItemChangeList extends React.Component { if (selectedKey === "fixed") { columns = [...columns, { dataIndex: "operate", - title: "操作", + title: getLabel(111, "操作"), render: (text, record) => { return
- this.handleEdit(record)}>编辑 + this.handleEdit(record)}>{getLabel(111, "编辑")} this.deleteSalaryItem(record.id)}> - 删除 + {getLabel(111, "删除")} } title=""> @@ -114,7 +116,7 @@ export default class SalaryItemChangeList extends React.Component { this.handlePageChange(value); }, total: singleSalaryItemList.total, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, current: singleSalaryItemList.pageNum }} xWidth={this.getColumns().length * 100} diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index 3abb7f69..1ae1cf78 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaInputNumber, WeaSearchGroup } from "ecCom"; +import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaInputNumber, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { inject, observer } from "mobx-react"; import SelectedTab from "../../components/selectedTab"; import SalaryItemChangeList from "./salaryItemChangeList"; @@ -7,10 +7,11 @@ import TaxAgentChangeList from "./taxAgentChangeList"; import { PickDate } from "../appConfig"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const selectedTabItems = [ { key: "0", - name: "薪资调整记录" + name: getLabel(111, "薪资调整记录") } ]; const baseInfolist = [ @@ -18,15 +19,15 @@ const baseInfolist = [ id: 1, items: [ { - label: "姓名", + label: getLabel(111, "姓名"), value: "username" }, { - label: "部门", + label: getLabel(111, "部门"), value: "department" }, { - label: "岗位", + label: getLabel(111, "岗位"), value: "position" } ] @@ -35,15 +36,15 @@ const baseInfolist = [ id: 2, items: [ { - label: "入职时间", + label: getLabel(111, "入职时间"), value: "hiredate" }, { - label: "手机号", + label: getLabel(111, "手机号"), value: "mobile" }, { - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: "taxAgent" } ] @@ -86,7 +87,7 @@ export default class SalaryFileViewSlide extends React.Component { const items = [ { com: PickDate({ - label: "起始发薪日期", + label: getLabel(111, "起始发薪日期"), viewAttr: selectedKey === "pending" ? 3 : 1, value: paysetParams.payStartDate, onChange: handleSetpay @@ -94,7 +95,7 @@ export default class SalaryFileViewSlide extends React.Component { }, { com: PickDate({ - label: "最后发薪日期", + label: getLabel(111, "最后发薪日期"), viewAttr: (selectedKey === "pending" || selectedKey === "fixed") ? 2 : selectedKey === "stop" ? 1 : 3, value: paysetParams.payEndDate, onChange: handleSetpay @@ -103,7 +104,7 @@ export default class SalaryFileViewSlide extends React.Component { ]; return (
- + { @@ -125,15 +126,15 @@ export default class SalaryFileViewSlide extends React.Component {
- + - 薪资档案 + {getLabel(111, "薪资档案")} @@ -169,7 +170,7 @@ export default class SalaryFileViewSlide extends React.Component { /> } - )) :
暂无数据
+ )) :
{getLabel(111, "暂无数据")}
}
} diff --git a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js index 0c900839..d769a08c 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js @@ -1,81 +1,81 @@ -import React from 'react'; -import { Table } from 'antd' -import { WeaTable } from 'ecCom' -import { inject, observer } from 'mobx-react'; -import EditAgentModal from './editAgentModal' +import React from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { inject, observer } from "mobx-react"; +import EditAgentModal from "./editAgentModal"; -@inject('salaryFileStore') +const getLabel = WeaLocaleProvider.getLabel; +@inject("salaryFileStore") @observer export default class TaxAgentChangeList extends React.Component { - constructor(props) { - super(props) - this.state = { - recordId: '', - editAgentVisible: false + constructor(props) { + super(props); + this.state = { + recordId: "", + editAgentVisible: false + }; + this.searchParams = {}; + } + + componentWillMount() { + const { salaryFileStore: { fetchSingleTaxAgentList } } = this.props; + this.searchParams = { salaryArchiveId: this.props.id, current: 1 }; + fetchSingleTaxAgentList(this.searchParams); + } + + // 编辑回调 + handleEdit(record) { + const { salaryFileStore: { setEditAgentVisible } } = this.props; + this.setState({ + recordId: record.id, + editAgentVisible: true + }); + } + + // 获取Columns + getColumns() { + const { salaryFileStore: { singleTaxAgentList } } = this.props; + let columns = []; + if (singleTaxAgentList.columns) { + columns = [...singleTaxAgentList.columns]; + } + return columns; + } + + // 页面跳转 + handlePageChange(value) { + this.searchParams.current = value; + const { salaryFileStore: { fetchSingleTaxAgentList } } = this.props; + fetchSingleTaxAgentList(this.searchParams); + } + + render() { + const { salaryFileStore } = this.props; + const { singleTaxAgentList } = salaryFileStore; + return ( +
+ { + this.handlePageChange(value); + }, + total: singleTaxAgentList.total, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, + current: singleTaxAgentList.pageNum + }} + /> + { + this.state.editAgentVisible && { + this.setState({ editAgentVisible: false }); + }} + /> } - this.searchParams = {} - } - - componentWillMount() { - const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props; - this.searchParams = {salaryArchiveId: this.props.id, current: 1} - fetchSingleTaxAgentList(this.searchParams) - } - - // 编辑回调 - handleEdit(record) { - const { salaryFileStore: {setEditAgentVisible} } = this.props; - this.setState({ - recordId: record.id, - editAgentVisible: true - }) - } - - // 获取Columns - getColumns() { - const { salaryFileStore: {singleTaxAgentList} } = this.props; - let columns = [] - if(singleTaxAgentList.columns) { - columns = [...singleTaxAgentList.columns] - } - return columns - } - - // 页面跳转 - handlePageChange(value) { - this.searchParams.current = value - const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props; - fetchSingleTaxAgentList(this.searchParams) - } - - render() { - const { salaryFileStore } = this.props; - const { singleTaxAgentList } = salaryFileStore - return ( -
- { -this.handlePageChange(value) -}, - total: singleTaxAgentList.total, - showTotal: (total) => `共 ${total} 条`, - current: singleTaxAgentList.pageNum - }} - /> - { - this.state.editAgentVisible && { -this.setState({editAgentVisible: false}) -}} - /> - } -
- ) - } -} \ No newline at end of file +
+ ); + } +} From 5196f38cb833ebad16ab16e987896a37735affd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 14:32:20 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=C2=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/addItems.js | 32 ++-- .../dataAcquisition/components/tableRecord.js | 11 +- .../dataAcquisition/cumDeduct/columns.js | 171 +++++++++--------- .../cumDeduct/components/importFormCom.js | 10 +- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 79 ++++---- 5 files changed, 157 insertions(+), 146 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js index 07dcad4d..1c0b3c7c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -4,12 +4,14 @@ * Description: */ import React, { Component } from "react"; -import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom"; +import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { getSearchs } from "../../util"; import { Select } from "../ruleConfig"; import { PickDate } from "../appConfig"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class AddItems extends Component { constructor(props) { super(props); @@ -77,7 +79,7 @@ class AddItems extends Component { let items = [ { com: PickDate({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), viewAttr: _.isEmpty(editId) ? 3 : 1, labelCol: { span: 6 }, wrapperCol: { span: 18 }, @@ -90,7 +92,7 @@ class AddItems extends Component { }, { com: Select({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), viewAttr: _.isEmpty(editId) ? 3 : 1, options: taxAgentOption, value: baseInfo.taxAgentId, @@ -101,7 +103,7 @@ class AddItems extends Component { }, { com: Browser({ - label: "人员", + label: getLabel(111, "人员"), viewAttr: _.isEmpty(editId) ? 3 : 1, value: baseInfo.employeeId, valueSpan: baseInfo.employeeName, @@ -114,7 +116,7 @@ class AddItems extends Component { const cumSituationitems = [ { com: PickDate({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), viewAttr: _.isEmpty(editId) ? 3 : 1, labelCol: { span: 6 }, wrapperCol: { span: 18 }, @@ -127,7 +129,7 @@ class AddItems extends Component { }, { com: Select({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), viewAttr: _.isEmpty(editId) ? 3 : 1, options: taxAgentOption, value: baseInfo.taxAgentId, @@ -138,11 +140,11 @@ class AddItems extends Component { }, { com: Select({ - label: "人员范围", + label: getLabel(111, "人员范围"), viewAttr: _.isEmpty(editId) ? 3 : 1, options: [ - { key: "ORGANIZATION", showname: "内部人员" } - // { key: "EXT_EMPLOYEE", showname: "非系统人员" } + { key: "ORGANIZATION", showname: getLabel(111, "内部人员") } + // { key: "EXT_EMPLOYEE", showname: getLabel(111, "非系统人员") } ], value: baseInfo.personArea, onChange: (data) => { @@ -153,7 +155,7 @@ class AddItems extends Component { ]; const insider = [{ com: Browser({ - label: "人员", + label: getLabel(111, "人员"), viewAttr: _.isEmpty(editId) ? 3 : 1, value: baseInfo.employeeId, valueSpan: baseInfo.employeeName, @@ -165,7 +167,7 @@ class AddItems extends Component { const noSysPerson = [ { com: InputCus({ - label: "姓名", + label: getLabel(111, "姓名"), viewAttr: 2, onChange: (username) => { this.setState({ baseInfo: { ...baseInfo, username } }); @@ -174,7 +176,7 @@ class AddItems extends Component { }, { com: InputCus({ - label: "身份证号码", + label: getLabel(111, "身份证号码"), viewAttr: 3, onChange: (idcard) => { this.setState({ baseInfo: { ...baseInfo, idcard } }); @@ -187,13 +189,13 @@ class AddItems extends Component {
{ getSearchs(form, condition, 2) } - 若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据 + {getLabel(111, "若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据")}
); } @@ -227,7 +229,7 @@ export const Tips = payload => { const { children } = payload; return (
-
小提示
+
{getLabel(111, "小提示")}
{children}
); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js index 00fedce7..3ac8fe1c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js @@ -5,12 +5,13 @@ * Date: 2023/2/20 */ import React, { Component } from "react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import UnifiedTable from "../../../components/UnifiedTable"; import { getTableRecordDate } from "../../../apis/cumDeduct"; import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; class TableRecord extends Component { constructor(props) { super(props); @@ -123,7 +124,7 @@ class TableRecord extends Component { }; const pagination = { ...pageInfo, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showSizeChanger: true, showQuickJumper: true, @@ -152,7 +153,7 @@ class TableRecord extends Component { }, { com: DataCollectionDateRangePick({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), range: recordPayload[screenParams[screenParams.length - 1]] || [], onChange: this.handleTablerecordScreen, key: screenParams[screenParams.length - 1] @@ -160,9 +161,9 @@ class TableRecord extends Component { }, { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: !_.isNil(recordPayload.taxAgentId) ? recordPayload.taxAgentId.toString() : "", - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], onChange: this.handleTablerecordScreen, key: "taxAgentId" }) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js index 9d6b6831..15b773ce 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js @@ -1,66 +1,69 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "title", key: "title" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "title", key: "title" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "title", key: "title" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "title", key: "title" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "title", key: "title" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "title", key: "title" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "title", key: "title" }, { - title: "累计子女教育", + title: getLabel(111, "累计子女教育"), dataIndex: "title", key: "title" }, { - title: "累计继续教育", + title: getLabel(111, "累计继续教育"), dataIndex: "title", key: "title" }, { - title: "累计住房贷款利息", + title: getLabel(111, "累计住房贷款利息"), dataIndex: "title", key: "title" }, { - title: "累计住房租金", + title: getLabel(111, "累计住房租金"), dataIndex: "title", key: "title" }, { - title: "累计赡养老人", + title: getLabel(111, "累计赡养老人"), dataIndex: "title", key: "title" }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "title", key: "title" } @@ -69,323 +72,323 @@ export const columns = [ export const modalColumns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "username", key: "username" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "taxAgentName", key: "taxAgentName" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "departmentName", key: "departmentName" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "mobile", key: "mobile" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "jobNum", key: "jobNum" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "idNo", key: "idNo" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "hiredate", key: "hiredate" }, { - title: "累计子女教育", + title: getLabel(111, "累计子女教育"), dataIndex: "addUpChildEducation", key: "addUpChildEducation" }, { - title: "累计继续教育", + title: getLabel(111, "累计继续教育"), dataIndex: "addUpContinuingEducation", key: "addUpContinuingEducation" }, { - title: "累计住房贷款利息", + title: getLabel(111, "累计住房贷款利息"), dataIndex: "addUpHousingLoanInterest", key: "addUpHousingLoanInterest" }, { - title: "累计住房租金", + title: getLabel(111, "累计住房租金"), dataIndex: "addUpHousingRent", key: "addUpHousingRent" }, { - title: "累计赡养老人", + title: getLabel(111, "累计赡养老人"), dataIndex: "addUpSupportElderly", key: "addUpSupportElderly" }, { - title: "累计婴幼儿照护", + title: getLabel(111, "累计婴幼儿照护"), dataIndex: "addUpInfantCare", key: "addUpInfantCare" }, { - title: "累计大病医疗", + title: getLabel(111, "累计大病医疗"), dataIndex: "addUpIllnessMedical", key: "addUpIllnessMedical" } ]; export const specialModalColumns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "username", key: "username" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "taxAgentName", key: "taxAgentName" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "departmentName", key: "departmentName" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "mobile", key: "mobile" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "jobNum", key: "jobNum" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "idNo", key: "idNo" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "hiredate", key: "hiredate" }, { - title: "子女教育", + title: getLabel(111, "子女教育"), dataIndex: "childrenEducation", key: "childrenEducation" }, { - title: "继续教育", + title: getLabel(111, "继续教育"), dataIndex: "continuingEducation", key: "continuingEducation" }, { - title: "住房贷款利息", + title: getLabel(111, "住房贷款利息"), dataIndex: "housingLoanInterest", key: "housingLoanInterest" }, { - title: "住房租金", + title: getLabel(111, "住房租金"), dataIndex: "housingRent", key: "housingRent" }, { - title: "赡养老人", + title: getLabel(111, "赡养老人"), dataIndex: "supportingElder", key: "supportingElder" }, { - title: "婴幼儿照护", + title: getLabel(111, "婴幼儿照护"), dataIndex: "infantCare", key: "infantCare" }, { - title: "大病医疗", + title: getLabel(111, "大病医疗"), dataIndex: "seriousIllnessTreatment", key: "seriousIllnessTreatment" } ]; export const otherModalColumns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "username", key: "username" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "taxAgentName", key: "taxAgentName" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "departmentName", key: "departmentName" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "mobile", key: "mobile" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "jobNum", key: "jobNum" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "idNo", key: "idNo" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "hiredate", key: "hiredate" }, { - title: "商业健康保险", + title: getLabel(111, "商业健康保险"), dataIndex: "businessHealthyInsurance", key: "businessHealthyInsurance" }, { - title: "税延养老保险", + title: getLabel(111, "税延养老保险"), dataIndex: "taxDelayEndowmentInsurance", key: "taxDelayEndowmentInsurance" }, { - title: "其他", + title: getLabel(111, "其他"), dataIndex: "otherDeduction", key: "otherDeduction" }, { - title: "准予扣除的捐赠额", + title: getLabel(111, "准予扣除的捐赠额"), dataIndex: "deductionAllowedDonation", key: "deductionAllowedDonation" } ]; export const situationModalColumns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "username", key: "username" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "taxAgentName", key: "taxAgentName" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "departmentName", key: "departmentName" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "mobile", key: "mobile" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "jobNum", key: "jobNum" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "idNo", key: "idNo" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "hiredate", key: "hiredate" }, { - title: "累计收入额", + title: getLabel(111, "累计收入额"), dataIndex: "addUpIncome", key: "addUpIncome" }, { - title: "累计减除费用", + title: getLabel(111, "累计减除费用"), dataIndex: "addUpSubtraction", key: "addUpSubtraction" }, { - title: "累计社保个人合计", + title: getLabel(111, "累计社保个人合计"), dataIndex: "addUpSocialSecurityTotal", key: "addUpSocialSecurityTotal" }, { - title: "累计公积金个人合计", + title: getLabel(111, "累计公积金个人合计"), dataIndex: "addUpAccumulationFundTotal", key: "addUpAccumulationFundTotal" }, { - title: "累计子女教育", + title: getLabel(111, "累计子女教育"), dataIndex: "addUpChildEducation", key: "addUpChildEducation" }, { - title: "累计继续教育", + title: getLabel(111, "累计继续教育"), dataIndex: "addUpContinuingEducation", key: "addUpContinuingEducation" }, { - title: "累计住房贷款利息", + title: getLabel(111, "累计住房贷款利息"), dataIndex: "addUpHousingLoanInterest", key: "addUpHousingLoanInterest" }, { - title: "累计住房租金", + title: getLabel(111, "累计住房租金"), dataIndex: "addUpHousingRent", key: "addUpHousingRent" }, { - title: "累计赡养老人", + title: getLabel(111, "累计赡养老人"), dataIndex: "addUpSupportElderly", key: "addUpSupportElderly" }, { - title: "累计企业(职业)年金及其他福利", + title: getLabel(111, "累计企业(职业)年金及其他福利"), dataIndex: "addUpEnterpriseAndOther", key: "addUpEnterpriseAndOther" }, { - title: "累计其他免税扣除", + title: getLabel(111, "累计其他免税扣除"), dataIndex: "addUpOtherDeduction", key: "addUpOtherDeduction" }, { - title: "累计免税收入", + title: getLabel(111, "累计免税收入"), dataIndex: "addUpTaxExemptIncome", key: "addUpTaxExemptIncome" }, { - title: "累计准予扣除的捐赠额", + title: getLabel(111, "累计准予扣除的捐赠额"), dataIndex: "addUpAllowedDonation", key: "addUpAllowedDonation" }, { - title: "累计减免税额", + title: getLabel(111, "累计减免税额"), dataIndex: "addUpTaxSavings", key: "addUpTaxSavings" }, { - title: "累计已预扣预缴税额", + title: getLabel(111, "累计已预扣预缴税额"), dataIndex: "addUpAdvanceTax", key: "addUpAdvanceTax" }, { - title: "累计婴幼儿照护", + title: getLabel(111, "累计婴幼儿照护"), dataIndex: "addUpInfantCare", key: "addUpInfantCare" }, { - title: "累计大病医疗", + title: getLabel(111, "累计大病医疗"), dataIndex: "addUpIllnessMedical", key: "addUpIllnessMedical" } @@ -402,7 +405,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpChildEducation"], fieldcol: 14, - label: "累计子女教育", + label: getLabel(111, "累计子女教育"), labelcol: 8, value: "", viewAttr: 2 @@ -411,7 +414,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpContinuingEducation"], fieldcol: 14, - label: "累计继续教育", + label: getLabel(111, "累计继续教育"), labelcol: 8, value: "", viewAttr: 2 @@ -420,7 +423,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpHousingLoanInterest"], fieldcol: 14, - label: "累计住房贷款利息", + label: getLabel(111, "累计住房贷款利息"), labelcol: 8, value: "", viewAttr: 2 @@ -429,7 +432,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpHousingRent"], fieldcol: 14, - label: "累计住房租金", + label: getLabel(111, "累计住房租金"), labelcol: 8, value: "", viewAttr: 2 @@ -438,7 +441,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpSupportElderly"], fieldcol: 14, - label: "累计赡养老人", + label: getLabel(111, "累计赡养老人"), labelcol: 8, value: "", viewAttr: 2 @@ -447,7 +450,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpIllnessMedical"], fieldcol: 14, - label: "累计大病医疗", + label: getLabel(111, "累计大病医疗"), labelcol: 8, value: "", viewAttr: 2 @@ -456,13 +459,13 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpInfantCare"], fieldcol: 14, - label: "累计婴幼儿照护", + label: getLabel(111, "累计婴幼儿照护"), labelcol: 8, value: "", viewAttr: 2 } ], - title: '数据采集', + title: getLabel(111, "数据采集"), defaultshow: true } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js index 0044f630..6b8707a9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/importFormCom.js @@ -5,9 +5,11 @@ * Date: 2023/2/20 */ import React, { Component } from "react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { DataCollectionDatePicker, DataCollectionSelect } from "../index"; +const getLabel = WeaLocaleProvider.getLabel; + class ImportFormCom extends Component { screenChange = ({ key, value }) => { const { onChangeImportForm } = this.props; @@ -19,7 +21,7 @@ class ImportFormCom extends Component { const items = [ { com: DataCollectionDatePicker({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), value: declareMonth, onChange: this.screenChange, key: "declareMonth", @@ -28,10 +30,10 @@ class ImportFormCom extends Component { }, { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: taxAgentId || "", onChange: this.screenChange, - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], key: "taxAgentId" }) } diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 3d3ac81f..53894d3a 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -5,13 +5,15 @@ * Date: 2022-09-19 18:15:32 */ import React, { Component } from "react"; -import { WeaFormItem, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; +import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; import { CheckBox } from "../appConfig"; import { Button, message, Modal } from "antd"; import * as API from "../../apis/ruleconfig"; import "./index.less"; import ProgressModal from "../../components/progressModal"; +const getLabel = WeaLocaleProvider.getLabel; + class Index extends Component { constructor(props) { super(props); @@ -52,7 +54,7 @@ class Index extends Component { items: [ { com: Select({ - label: "排序字段", + label: getLabel(111, "排序字段"), onChange: this.handleChane, value: sysOrderRule.data.orderRule, options: orderOptions @@ -60,7 +62,7 @@ class Index extends Component { }, { com: Select({ - label: "正序/倒序", + label: getLabel(111, "正序/倒序"), onChange: this.handleChane, value: sysOrderRule.data.ascOrDesc, options: ascOptions @@ -70,7 +72,7 @@ class Index extends Component { importItems: [ { com: Select({ - label: "人员字段", + label: getLabel(111, "人员字段"), onChange: this.handleChane, value: sysConfCodeRule.data, options: employeeOptions @@ -80,18 +82,18 @@ class Index extends Component { enctryItems: queryAppsetting.data.showEncryptOperationButton === "true" ? [ { com: CheckBox({ - label: "加密设置", + label: getLabel(111, "加密设置"), value: queryAppsetting.data.isOpenEncrypt, - onChange: (data) => this.handleChane({ type: "加密设置", selected: data }) + onChange: (data) => this.handleChane({ type: getLabel(111, "加密设置"), selected: data }) }) } ] : [], declareItems: [ { com: CheckBox({ - label: "个税申报", + label: getLabel(111, "个税申报"), value: queryAppsetting.data.isOpenTaxDeclaration, - onChange: (data) => this.handleChane({ type: "个税申报", selected: data }) + onChange: (data) => this.handleChane({ type: getLabel(111, "个税申报"), selected: data }) }) } ], @@ -138,8 +140,8 @@ class Index extends Component { if (type === "ORDER") { if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -147,17 +149,17 @@ class Index extends Component { API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => { this.setState({ loading: { ...this.state.loading, order: false } }); if (status) { - message.success("保存成功!"); + message.success(getLabel(111, "保存成功")); let sysSetting = this.getSysSetting(); } else { - message.error(errormsg || "保存失败!"); + message.error(errormsg || getLabel(111, "保存失败")); } }); } else if (type === "EMPLOYEE") { if (_.isEmpty(saveParams.rule)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -165,16 +167,16 @@ class Index extends Component { API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => { this.setState({ loading: { ...this.state.loading, employee: false } }); if (status) { - message.success("保存成功!"); + message.success(getLabel(111, "保存成功")); let sysSetting = this.getSysSetting(); } else { - message.error(errormsg || "保存失败!"); + message.error(errormsg || getLabel(111, "保存失败")); } }); } else if (type === "ENCRYTION") { Modal.confirm({ - title: "信息确认", - content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!", + title: getLabel(111, "信息确认"), + content: getLabel(111, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"), onOk: () => { this.setState({ loading: { ...this.state.loading, encry: true } }); API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { @@ -182,7 +184,7 @@ class Index extends Component { if (status) { const { isSuccess, progressId, msg } = data; if (!isSuccess) { - message.error(errormsg || msg || "保存失败!"); + message.error(errormsg || msg || getLabel(111, "保存失败")); return; } this.setState({ @@ -205,7 +207,7 @@ class Index extends Component { progressVisible: false }); }); - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); } else if (progress_statue === "in_progress" && this.timer) { if (this.state.progress >= 90) { this.setState({ @@ -227,7 +229,7 @@ class Index extends Component { progressVisible: false }); }); - message.error(errormsg || "保存失败!"); + message.error(errormsg || getLabel(111, "保存失败")); } }); }, 1000); @@ -243,10 +245,10 @@ class Index extends Component { API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => { this.setState({ loading: { ...this.state.loading, declare: false } }); if (status) { - message.success("保存成功!"); + message.success(getLabel(111, "保存成功")); let sysSetting = this.getSysSetting(); } else { - message.error(errormsg || "保存失败!"); + message.error(errormsg || getLabel(111, "保存失败")); } }); } @@ -254,23 +256,23 @@ class Index extends Component { handleChane = (data) => { const { type, selected } = data; - if (type === "排序字段") { + if (type === getLabel(111, "排序字段")) { this.setState({ saveParams: { ...this.state.saveParams, orderRule: selected } }); - } else if (type === "正序/倒序") { + } else if (type === getLabel(111, "正序/倒序")) { this.setState({ saveParams: { ...this.state.saveParams, ascOrDesc: selected } }); - } else if (type === "人员字段") { + } else if (type === getLabel(111, "人员字段")) { this.setState({ saveParams: { ...this.state.saveParams, rule: selected } }); - } else if (type === "加密设置") { + } else if (type === getLabel(111, "加密设置")) { this.setState({ saveParams: { ...this.state.saveParams, enctry: selected } }); - } else if (type === "个税申报") { + } else if (type === getLabel(111, "个税申报")) { this.setState({ saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected } }); @@ -282,7 +284,7 @@ class Index extends Component { return (
规则配置} + title={{getLabel(111, "规则配置")}} icon={} iconBgcolor="#F14A2D" buttons={[]} @@ -291,16 +293,17 @@ class Index extends Component { - 排序规则 - + {getLabel(111, "排序规则")} +
} showGroup center items={items}/> - 人员校验规则 + {getLabel(111, "人员校验规则")} + loading={loading.employee}>{getLabel(111, "保存")}
} showGroup center items={importItems}/> { @@ -308,24 +311,24 @@ class Index extends Component { - 加密规则 + {getLabel(111, "加密规则")} + loading={loading.encry}>{getLabel(111, "保存")}
} showGroup center items={enctryItems}/> } - 报税规则 + {getLabel(111, "报税规则")} + loading={loading.declare}>{getLabel(111, "保存")}
} showGroup center items={declareItems}/> { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); From eeb8c3a917d5d22909b5646aad46c2713b568a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 15:08:58 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=C2=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataAcquisition/cumSituation/columns.js | 89 ++++++++++--------- .../dataAcquisition/cumSituation/index.js | 78 ++++++++-------- .../dataAcquisition/otherDeduct/columns.js | 41 +++++---- .../dataAcquisition/otherDeduct/index.js | 82 ++++++++--------- 4 files changed, 150 insertions(+), 140 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 689db6a4..93016106 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -1,66 +1,69 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "title", key: "title" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "title", key: "title" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "title", key: "title" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "title", key: "title" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "title", key: "title" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "title", key: "title" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "title", key: "title" }, { - title: "累计子女教育", + title: getLabel(111, "累计子女教育"), dataIndex: "title", key: "title" }, { - title: "累计继续教育", + title: getLabel(111, "累计继续教育"), dataIndex: "title", key: "title" }, { - title: "累计住房贷款利息", + title: getLabel(111, "累计住房贷款利息"), dataIndex: "title", key: "title" }, { - title: "累计住房租金", + title: getLabel(111, "累计住房租金"), dataIndex: "title", key: "title" }, { - title: "累计赡养老人", + title: getLabel(111, "累计赡养老人"), dataIndex: "title", key: "title" }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "title", key: "title" } @@ -72,7 +75,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpIncome"], fieldcol: 14, - label: "累计收入额", + label: getLabel(111, "累计收入额"), labelcol: 8, value: "", viewAttr: 2 @@ -81,7 +84,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpSubtraction"], fieldcol: 14, - label: "累计减除费用", + label: getLabel(111, "累计减除费用"), labelcol: 8, value: "", viewAttr: 2 @@ -90,7 +93,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpSocialSecurityTotal"], fieldcol: 14, - label: "累计社保个人合计", + label: getLabel(111, "累计社保个人合计"), labelcol: 8, value: "", viewAttr: 2 @@ -99,7 +102,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpAccumulationFundTotal"], fieldcol: 14, - label: "累计公积金个人合计", + label: getLabel(111, "累计公积金个人合计"), labelcol: 8, value: "", viewAttr: 2 @@ -108,7 +111,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpChildEducation"], fieldcol: 14, - label: "累计子女教育", + label: getLabel(111, "累计子女教育"), labelcol: 8, value: "", viewAttr: 2 @@ -117,7 +120,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpContinuingEducation"], fieldcol: 14, - label: "累计继续教育", + label: getLabel(111, "累计继续教育"), labelcol: 8, value: "", viewAttr: 2 @@ -126,7 +129,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpHousingLoanInterest"], fieldcol: 14, - label: "累计住房贷款利息", + label: getLabel(111, "累计住房贷款利息"), labelcol: 8, value: "", viewAttr: 2 @@ -135,7 +138,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpHousingRent"], fieldcol: 14, - label: "累计住房租金", + label: getLabel(111, "累计住房租金"), labelcol: 8, value: "", viewAttr: 2 @@ -144,7 +147,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpSupportElderly"], fieldcol: 14, - label: "累计赡养老人", + label: getLabel(111, "累计赡养老人"), labelcol: 8, value: "", viewAttr: 2 @@ -153,7 +156,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpIllnessMedical"], fieldcol: 14, - label: "累计大病医疗", + label: getLabel(111, "累计大病医疗"), labelcol: 8, value: "", viewAttr: 2 @@ -162,7 +165,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpEnterpriseAndOther"], fieldcol: 14, - label: "累计企业(职业)年金及其他福利", + label: getLabel(111, "累计企业(职业)年金及其他福利"), labelcol: 8, value: "", viewAttr: 2 @@ -171,7 +174,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpOtherDeduction"], fieldcol: 14, - label: "累计其他免税扣除", + label: getLabel(111, "累计其他免税扣除"), labelcol: 8, value: "", viewAttr: 2 @@ -180,7 +183,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpTaxExemptIncome"], fieldcol: 14, - label: "累计免税收入", + label: getLabel(111, "累计免税收入"), labelcol: 8, value: "", viewAttr: 2 @@ -189,7 +192,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpAllowedDonation"], fieldcol: 14, - label: "累计准予扣除的捐赠额", + label: getLabel(111, "累计准予扣除的捐赠额"), labelcol: 8, value: "", viewAttr: 2 @@ -198,7 +201,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpTaxSavings"], fieldcol: 14, - label: "累计减免税额", + label: getLabel(111, "累计减免税额"), labelcol: 8, value: "", viewAttr: 2 @@ -207,7 +210,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpAdvanceTax"], fieldcol: 14, - label: "累计已预扣预缴税额", + label: getLabel(111, "累计已预扣预缴税额"), labelcol: 8, value: "", viewAttr: 2 @@ -216,63 +219,63 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["addUpInfantCare"], fieldcol: 14, - label: "累计婴幼儿照护", + label: getLabel(111, "累计婴幼儿照护"), labelcol: 8, value: "", viewAttr: 2 } ], - title: "数据采集", + title: getLabel(111, "数据采集"), defaultshow: true } ]; export const taxOptions = [ { key: "01", - showname: "一月" + showname: getLabel(111, "一月") }, { key: "02", - showname: "二月" + showname: getLabel(111, "二月") }, { key: "03", - showname: "三月" + showname: getLabel(111, "三月") }, { key: "04", - showname: "四月" + showname: getLabel(111, "四月") }, { key: "05", - showname: "五月" + showname: getLabel(111, "五月") }, { key: "06", - showname: "六月" + showname: getLabel(111, "六月") }, { key: "07", - showname: "七月" + showname: getLabel(111, "七月") }, { key: "08", - showname: "八月" + showname: getLabel(111, "八月") }, { key: "09", - showname: "九月" + showname: getLabel(111, "九月") }, { key: "10", - showname: "十月" + showname: getLabel(111, "十月") }, { key: "11", - showname: "十一月" + showname: getLabel(111, "十一月") }, { key: "12", - showname: "十二月" + showname: getLabel(111, "十二月") } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 78c77a40..6b39c5bc 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { createAddUpSituation, @@ -30,6 +30,8 @@ import TableRecord from "../components/tableRecord"; import { situationModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore", "cumSituationStore") @observer class Index extends Component { @@ -102,22 +104,22 @@ class Index extends Component { editAddUpSituation({ ...payload, id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("编辑成功"); + message.success(getLabel(111, "编辑成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "编辑失败"); + message.error(errormsg || getLabel(111, "编辑失败")); } }); } else { createAddUpSituation(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } @@ -158,7 +160,7 @@ class Index extends Component { importPayload: { ...importPayload, slideDataSource: preview } }); } else { - message.error(errormsg || "预览失败"); + message.error(errormsg || getLabel(111, "预览失败")); } }); }; @@ -171,7 +173,7 @@ class Index extends Component { handleTableOperate = ({ key }, record) => { const { id } = record; key === "handleAddData" ? getAddUpSituation({ id }).then(({ status, data }) => { - if (status) this[key]("编辑", data); + if (status) this[key](getLabel(111, "编辑"), data); }) : this.deleteSelectAddUpSituation(record); }; /* @@ -180,7 +182,7 @@ class Index extends Component { * Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位 * Date: 2023/2/20 */ - handleAddData = (title = "新建", editId = {}) => { + handleAddData = (title = getLabel(111, "新建"), editId = {}) => { const { taxAgentStore, cumSituationStore: { addForm } } = this.props; const { slidePayload } = this.state; const { taxAgentOption } = taxAgentStore; @@ -223,15 +225,15 @@ class Index extends Component { taxYearMonth: year + "-" + declareMonth }; Modal.confirm({ - title: "信息确认", - content: `确定清空税款所属期为${year}-${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定清空税款所属期为")}${year}-${declareMonth}${getLabel(111, "的所有往期累计情况的数据吗")}?${declareMonth}${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteAllAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -248,7 +250,7 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { id, departmentName, username } = record; if (ids.length === 0 && !id) { - message.warning("请选择表格数据"); + message.warning(getLabel(111, "请选择表格数据")); return; } const payload = { @@ -256,17 +258,17 @@ class Index extends Component { ids: !id ? ids : [id] }; Modal.confirm({ - title: "信息确认", - content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" : - `确定删除${departmentName}${username}(税款所属期:${declareMonth})的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") : + `${getLabel(111, "确定删除")}${departmentName}${username}(${getLabel(111, "税款所属期")}:${declareMonth})${getLabel(111, "的往期累计情况数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); this.tableRef.handleClearRows(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -296,7 +298,7 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { declareMonth, taxAgentId, year, exportPayloadType } = this.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } this.setState({ @@ -313,19 +315,19 @@ class Index extends Component { getTopBtns = () => { const { addAllLoading } = this.state; return [ - , - , + , + , - 批量删除 - 一键清空 - 导出选中 - 导出全部 + {getLabel(111, "批量删除")} + {getLabel(111, "一键清空")} + {getLabel(111, "导出选中")} + {getLabel(111, "导出全部")} } > - + ]; }; @@ -342,19 +344,19 @@ class Index extends Component { const items = [ { com: DataCollectionDatePicker({ - label: "纳税年度", + label: getLabel(111, "纳税年度"), value: year, onChange: this.screenChange, key: "year", format: "YYYY", - tip: "提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额", + tip: getLabel(111, "提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额"), labelCol: 11, wrapperCol: 13 }) }, { com: DataCollectionSelect({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), value: declareMonth, onChange: this.screenChange, options: taxOptions, @@ -365,10 +367,10 @@ class Index extends Component { }, { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: taxAgentId, onChange: this.screenChange, - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], key: "taxAgentId", labelCol: 16, wrapperCol: 8 @@ -406,8 +408,8 @@ class Index extends Component { const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v); if (!bool) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -473,10 +475,10 @@ class Index extends Component { - 导出选中 + {getLabel(111, "导出选中")} } type="primary"> - 导出全部 + {getLabel(111, "导出全部")} ]; }; @@ -498,7 +500,7 @@ class Index extends Component { handleExportSelectDetail = () => { const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, ""); @@ -520,7 +522,7 @@ class Index extends Component { } = this.state; const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId }; return ( - this.handleAddData("往期累计情况(工资、薪金)记录", record)} + onViewDetails={(record) => this.handleAddData(getLabel(111, "往期累计情况(工资、薪金)记录"), record)} form={form} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js index 6f542381..cd207dd4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js @@ -1,66 +1,69 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "title", key: "title" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "title", key: "title" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "title", key: "title" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "title", key: "title" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "title", key: "title" }, { - title: "证件号码", + title: getLabel(111, "证件号码"), dataIndex: "title", key: "title" }, { - title: "入职日期", + title: getLabel(111, "入职日期"), dataIndex: "title", key: "title" }, { - title: "累计子女教育", + title: getLabel(111, "累计子女教育"), dataIndex: "title", key: "title" }, { - title: "累计继续教育", + title: getLabel(111, "累计继续教育"), dataIndex: "title", key: "title" }, { - title: "累计住房贷款利息", + title: getLabel(111, "累计住房贷款利息"), dataIndex: "title", key: "title" }, { - title: "累计住房租金", + title: getLabel(111, "累计住房租金"), dataIndex: "title", key: "title" }, { - title: "累计赡养老人", + title: getLabel(111, "累计赡养老人"), dataIndex: "title", key: "title" }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "title", key: "title" } @@ -72,7 +75,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["businessHealthyInsurance"], fieldcol: 14, - label: "商业健康保险", + label: getLabel(111, "商业健康保险"), labelcol: 8, value: "", viewAttr: 2 @@ -81,7 +84,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["taxDelayEndowmentInsurance"], fieldcol: 14, - label: "税延养老保险", + label: getLabel(111, "税延养老保险"), labelcol: 8, value: "", viewAttr: 2 @@ -90,7 +93,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["otherDeduction"], fieldcol: 14, - label: "其他", + label: getLabel(111, "其他"), labelcol: 8, value: "", viewAttr: 2 @@ -99,7 +102,7 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["deductionAllowedDonation"], fieldcol: 14, - label: "准予扣除的捐赠额", + label: getLabel(111, "准予扣除的捐赠额"), labelcol: 8, value: "", viewAttr: 2 @@ -108,13 +111,13 @@ export const dataCollectCondition = [ conditionType: "INPUT", domkey: ["privatePension"], fieldcol: 14, - label: "个人养老金", + label: getLabel(111, "个人养老金"), labelcol: 8, value: "", viewAttr: 2 } ], - title: "数据采集", + title: getLabel(111, "数据采集"), defaultshow: true } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 5e5aec09..79107804 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { createData, @@ -31,6 +31,8 @@ import TableRecord from "../components/tableRecord"; import { otherModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore", "otherDeductStore") @observer class Index extends Component { @@ -100,10 +102,10 @@ class Index extends Component { extendToLastMonth(payload).then(({ status, data, errormsg }) => { this.setState({ lastLoading: false }); if (status) { - message.success(data || "操作成功"); + message.success(data || getLabel(111, "操作成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }).catch(() => this.setState({ lastLoading: false })); }; @@ -122,22 +124,22 @@ class Index extends Component { editData({ ...payload, id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("编辑成功"); + message.success(getLabel(111, "编辑成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "编辑失败"); + message.error(errormsg || getLabel(111, "编辑失败")); } }); } else { createData(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } @@ -173,7 +175,7 @@ class Index extends Component { importPayload: { ...importPayload, slideDataSource: preview } }); } else { - message.error(errormsg || "预览失败"); + message.error(errormsg || getLabel(111, "预览失败")); } }); }; @@ -186,7 +188,7 @@ class Index extends Component { handleTableOperate = ({ key }, record) => { const { id } = record; key === "handleAddData" ? getData({ id }).then(({ status, data }) => { - if (status) this[key]("编辑", data); + if (status) this[key](getLabel(111, "编辑"), data); }) : this.deleteSelectData(record); }; /* @@ -199,15 +201,15 @@ class Index extends Component { const { declareMonth, taxAgentId } = this.state; const payload = { declareMonth, taxAgentId }; Modal.confirm({ - title: "信息确认", - content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定清空税款所属期为")}${declareMonth}${getLabel(111, "的所有其他免税扣除数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteAllData(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -224,22 +226,22 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { id, departmentName, username } = record; if (ids.length === 0 && !id) { - message.warning("请选择表格数据"); + message.warning(getLabel(111, "请选择表格数据")); return; } const payload = { declareMonth, ids: !id ? ids : [id] }; Modal.confirm({ - title: "信息确认", - content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" : - `确定删除${departmentName}${username}(税款所属期:${declareMonth})的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") : + `${getLabel(111, "确定删除")}${departmentName}${username}(${getLabel(111, "税款所属期")}:${declareMonth})${getLabel(111, "的其他免税扣除数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { deleteSelectData(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); this.tableRef.handleClearRows(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -269,7 +271,7 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { declareMonth, taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } this.setState({ @@ -283,7 +285,7 @@ class Index extends Component { * Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位 * Date: 2023/2/20 */ - handleAddData = (title = "新建", editId = {}) => { + handleAddData = (title = getLabel(111, "新建"), editId = {}) => { const { taxAgentStore, otherDeductStore: { addForm } } = this.props; const { slidePayload } = this.state; const { taxAgentOption } = taxAgentStore; @@ -322,20 +324,20 @@ class Index extends Component { getTopBtns = () => { const { lastLoading } = this.state; return [ - , - , - , + , + , + , - 批量删除 - 一键清空 - 导出选中 - 导出全部 + {getLabel(111, "批量删除")} + {getLabel(111, "一键清空")} + {getLabel(111, "导出选中")} + {getLabel(111, "导出全部")} } > - + ]; }; @@ -352,19 +354,19 @@ class Index extends Component { const items = [ { com: DataCollectionDatePicker({ - label: "税款所属期", + label: getLabel(111, "税款所属期"), value: declareMonth, onChange: this.screenChange, key: "declareMonth", - tip: "提示:默认显示当前月所有员工申报的其他免税扣除额" + tip: getLabel(111, "提示:默认显示当前月所有员工申报的其他免税扣除额") }) }, { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: taxAgentId, onChange: this.screenChange, - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], key: "taxAgentId" }) } @@ -396,8 +398,8 @@ class Index extends Component { const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v); if (!bool) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -466,10 +468,10 @@ class Index extends Component { - 导出选中 + {getLabel(111, "导出选中")} } type="primary"> - 导出全部 + {getLabel(111, "导出全部")} ]; }; @@ -491,7 +493,7 @@ class Index extends Component { handleExportSelectDetail = () => { const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, ""); @@ -513,7 +515,7 @@ class Index extends Component { } = this.state; const tablePayload = { declareMonth: [declareMonth], taxAgentId }; return ( - this.handleAddData("其他免税扣除记录", record)} + onViewDetails={(record) => this.handleAddData(getLabel(111, "其他免税扣除记录"), record)} form={form} /> From a9309d900512c815071a01cb803cf54d397442ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 16:08:54 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=C2=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/importModal/headerSet.js | 4 +- .../components/selectItemsModal/index.js | 14 ++-- .../selectItemsModal/selectItemsWrapper.js | 10 +-- pc4mobx/hrmSalary/index.js | 3 +- .../dataAcquisition/attendance/columns.js | 61 ++++++++--------- .../components/attendanceCustomFieldsModal.js | 9 +-- .../components/attendanceDataComp.js | 35 +++++----- .../components/attendanceDataViewSlide.js | 12 ++-- .../components/attendanceRefrenceDataModal.js | 25 +++---- .../attendance/components/fieldMangComp.js | 16 +++-- .../components/importFormOptions.js | 11 ++-- .../pages/dataAcquisition/attendance/index.js | 21 +++--- .../components/condition.js | 33 +++++----- .../specialAddDeduction/index.js | 65 ++++++++++--------- 14 files changed, 169 insertions(+), 150 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importModal/headerSet.js b/pc4mobx/hrmSalary/components/importModal/headerSet.js index 41fe75a7..204e5100 100644 --- a/pc4mobx/hrmSalary/components/importModal/headerSet.js +++ b/pc4mobx/hrmSalary/components/importModal/headerSet.js @@ -1,12 +1,14 @@ import React from "react"; import { Button } from "antd"; +import { WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export default class HeaderSet extends React.Component { render() { return (
+ loading={this.props.loading}>{getLabel(111, "表头设置")} {/**/} {/*保存]; + const btns = []; const moreBtn = { datas: [ { key: "recovery", - content: "恢复默认设置", + content: getLabel(111, "恢复默认设置"), icon: , onClick: key => onMoreOpts(key) }, { key: "setting", - content: "设为默认设置", + content: getLabel(111, "设为默认设置"), icon: , onClick: key => onMoreOpts(key) } @@ -51,11 +51,11 @@ export default class SelectItemModal extends React.Component { const titleComp =
{title} this.setState({ searchValue })} - placeholder="请输入关键字" style={{ width: 200 }} + placeholder={getLabel(111, "请输入关键字")} style={{ width: 200 }} onSearch={onSearchItemSet} />
; - const bottomLeft = ; + const bottomLeft = ; return ( { return [...pre, ...cur.items]; @@ -59,7 +61,7 @@ class SelectItemsWrapper extends Component { const value = _.every(items, it => !!it.checked) ? "1" : "0"; return
onSelectGroupAll(groupId, val)}/> - 已选择{number}个字段 + {`${getLabel(111, "已选择")}${number}${getLabel(111, "个字段")}`}
; }; @@ -94,7 +96,7 @@ class SelectItemsWrapper extends Component {
{ _.isEmpty(items) ? - 暂无数据 : + {getLabel(111, "暂无数据")} :
    { _.map(items, child => { diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 79a1f799..7e2c3fbd 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -105,8 +105,6 @@ const Routes = ( /> - - {/*系统语言改造截止处*/} + {/*系统语言改造截止处*/} { @@ -76,31 +79,31 @@ export const fieldsColumns = [ display: true }, { - title: "字段名称", + title: getLabel(111, "字段名称"), dataIndex: "fieldName", key: "fieldName", display: true }, { - title: "来源", + title: getLabel(111, "来源"), dataIndex: "sourceType", key: "sourceType", display: true }, { - title: "类型", + title: getLabel(111, "类型"), dataIndex: "fieldType", key: "fieldType", display: true }, { - title: "是否启用", + title: getLabel(111, "是否启用"), dataIndex: "enableStatus", key: "enableStatus", display: true }, { - title: "备注", + title: getLabel(111, "备注"), dataIndex: "description", key: "description", display: true @@ -115,7 +118,7 @@ export const conditions = [ domkey: ["fieldName"], fieldcol: 14, rules: "required|string", - label: "字段名称", + label: getLabel(111, "字段名称"), labelcol: 6, value: "", viewAttr: 3 @@ -126,19 +129,19 @@ export const conditions = [ domkey: ["fieldType"], fieldcol: 14, isQuickSearch: false, - label: "类型", + label: getLabel(111, "类型"), labelcol: 6, - valueList:[], + valueList: [], options: [ { key: "NUMBER", selected: true, - showname: "数值" + showname: getLabel(111, "数值") }, { key: "TEXT", selected: false, - showname: "文本" + showname: getLabel(111, "文本") } ], rules: "required|string", @@ -149,7 +152,7 @@ export const conditions = [ conditionType: "SWITCH", domkey: ["enableStatus"], fieldcol: 14, - label: "是否启用", + label: getLabel(111, "是否启用"), labelcol: 6, viewAttr: 3, rules: "required" @@ -159,7 +162,7 @@ export const conditions = [ conditionType: "INPUT", domkey: ["description"], fieldcol: 14, - label: "备注", + label: getLabel(111, "备注"), labelcol: 6, value: "", viewAttr: 2 @@ -177,7 +180,7 @@ export const reFrenceConditions = [ domkey: ["salaryYearMonth"], fieldcol: 18, rules: "required|string", - label: "薪资所属月", + label: getLabel(111, "薪资所属月"), labelcol: 6, value: "", viewAttr: 3 @@ -188,9 +191,9 @@ export const reFrenceConditions = [ domkey: ["salarySobId"], fieldcol: 18, isQuickSearch: false, - label: "薪资账套", + label: getLabel(111, "薪资账套"), labelcol: 6, - valueList:[], + valueList: [], options: [], rules: "required|string", viewAttr: 3 @@ -200,7 +203,7 @@ export const reFrenceConditions = [ conditionType: "INPUT", domkey: ["description"], fieldcol: 18, - label: "备注", + label: getLabel(111, "备注"), labelcol: 6, value: "", viewAttr: 2 diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js index 0bbc46f0..986fe6d7 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceCustomFieldsModal.js @@ -6,13 +6,14 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { Button, message } from "antd"; import { conditions } from "../columns"; import { getSearchs } from "../../../../util"; import { saveAttendanceField } from "../../../../apis/attendance"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("attendanceStore") @observer class AttendanceCustomFieldsModal extends Component { @@ -39,11 +40,11 @@ class AttendanceCustomFieldsModal extends Component { const payload = form.getFormParams(); saveAttendanceField(payload).then(({ status, errormsg }) => { if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); onCancel(); onRefresh(); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } else { @@ -59,7 +60,7 @@ class AttendanceCustomFieldsModal extends Component { render() { const { attendanceStore: { form } } = this.props; const buttons = [ - + ]; return ( { Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { deleteAttendance([id]).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.getAttendanceList(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -206,7 +207,7 @@ class AttendanceDataComp extends Component { const { importFormPayload } = this.state; const { salarySobId, salaryYearMonth } = importFormPayload; if (!salarySobId || !salaryYearMonth) { - message.warning("请完善导入选项,再下载"); + message.warning(getLabel(111, "请完善导入选项,再下载")); return; } window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`); @@ -226,7 +227,7 @@ class AttendanceDataComp extends Component { this.setState({ fieldSetPayload: { ...fieldSetPayload, - visible: true, title: "导入字段设置", + visible: true, title: getLabel(111, "导入字段设置"), children: this.setItemRef = dom} dataSource={data} @@ -256,10 +257,10 @@ class AttendanceDataComp extends Component { case "recovery": returnToAttendanceFieldSettingDefault({ sourceType: "IMPORT" }).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.handleHeaderSettings({ sourceType: "IMPORT" }); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); break; @@ -278,9 +279,9 @@ class AttendanceDataComp extends Component { const payload = { currentSettingFields, sourceType: "IMPORT" }; saveAttendanceFieldSettingAsDefault(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); break; @@ -303,10 +304,10 @@ class AttendanceDataComp extends Component { const payload = { currentSettingFields, sourceType: "IMPORT" }; saveAttendanceFieldSetting(payload).then(({ status, errormsg }) => { if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); this.handleCloseSettings(); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }); }; @@ -335,7 +336,7 @@ class AttendanceDataComp extends Component { const { showOperateBtn, salaryYearMonth } = this.props; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -356,15 +357,15 @@ class AttendanceDataComp extends Component { columns={[ ...columns, { - title: "操作", + title: getLabel(111, "操作"), width: 120, dataIndex: "operate", render: (_, record) => { return ( ); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index b692e31e..2abd134c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -5,13 +5,15 @@ * Date: 2023/3/7 */ import React, { Component } from "react"; -import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom"; +import { WeaFormItem, WeaInput, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom"; import { Button } from "antd"; import SlideModalTitle from "../../../../components/slideModalTitle"; import { viewAttendQuote } from "../../../../apis/attendance"; import UnifiedTable from "../../../../components/UnifiedTable"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class AttendanceDataViewSlide extends Component { constructor(props) { super(props); @@ -57,7 +59,7 @@ class AttendanceDataViewSlide extends Component { this.setState({ keyword })} onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)} /> @@ -81,7 +83,7 @@ class AttendanceDataViewSlide extends Component { const { columns, dataSource, loading, pageInfo } = this.state; const pagination = { ...pageInfo, - showTotal: (total) => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showSizeChanger: true, showQuickJumper: true, @@ -109,7 +111,7 @@ class AttendanceDataViewSlide extends Component { direction="right" title={ - + { this.setState({ loading: false }); if (status) { - message.success("同步成功"); + message.success(getLabel(111, "同步成功")); onCancel(true); } else { - message.error(errormsg || "同步失败"); + message.error(errormsg || getLabel(111, "同步失败")); } }).catch(() => this.setState({ loading: false })); } else { @@ -116,7 +117,7 @@ class AttendanceRefrenceDataModal extends Component { this.setState({ headerSetPayload: { ...headerSetPayload, - visible: true, title: "引用考勤字段设置", + visible: true, title: getLabel(111, "引用考勤字段设置"), children: this.setItemRef = dom} dataSource={data} @@ -146,10 +147,10 @@ class AttendanceRefrenceDataModal extends Component { case "recovery": returnToAttendanceFieldSettingDefault({ sourceType: "QUOTE" }).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.handleHeaderSetting({ sourceType: "QUOTE" }); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); break; @@ -168,9 +169,9 @@ class AttendanceRefrenceDataModal extends Component { const payload = { currentSettingFields, sourceType: "QUOTE" }; saveAttendanceFieldSettingAsDefault(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); break; @@ -193,10 +194,10 @@ class AttendanceRefrenceDataModal extends Component { const payload = { currentSettingFields, sourceType: "QUOTE" }; saveAttendanceFieldSetting(payload).then(({ status, errormsg }) => { if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); this.handleCloseSettings(); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }); }; @@ -205,8 +206,8 @@ class AttendanceRefrenceDataModal extends Component { const { condition, loading, headerSetLoading, headerSetPayload } = this.state; const { attendanceStore: { refenceform } } = this.props; const buttons = [ - , - + , + ]; return ( { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.getAttendanceFieldList(); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -94,7 +96,7 @@ class FieldMangComp extends Component { const { fieldName } = this.props; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -126,8 +128,8 @@ class FieldMangComp extends Component { diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js index f16d18f3..2caecbfa 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importFormOptions.js @@ -5,10 +5,11 @@ * Date: 2023/3/3 */ import React, { Component } from "react"; -import { WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom"; +import { WeaFormItem, WeaInput, WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import { DataCollectionDatePicker, DataCollectionSelect } from "../../cumDeduct"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const Input = (label, value, labelCol = 8, wrapperCol = 16) => { return ( @@ -28,7 +29,7 @@ class ImportFormOptions extends Component { const items = [ { com: DataCollectionDatePicker({ - label: "薪资所属月", + label: getLabel(111, "薪资所属月"), value: salaryYearMonth, onChange: this.screenChange, key: "salaryYearMonth", @@ -37,15 +38,15 @@ class ImportFormOptions extends Component { }, { com: DataCollectionSelect({ - label: "薪资账套", + label: getLabel(111, "薪资账套"), value: salarySobId || "", onChange: this.screenChange, options: [{ key: "", showname: "" }, ...salarySobList], key: "salarySobId" }) }, - { com: Input("薪资周期", salaryCycle) }, - { com: Input("考勤周期", attendCycle, 10, 14) } + { com: Input(getLabel(111, "薪资周期"), salaryCycle) }, + { com: Input(getLabel(111, "考勤周期"), attendCycle, 10, 14) } ]; return ( { const { salaryMonth } = this.state; const [value1 = "", value2 = ""] = salaryMonth; - return + return { @@ -44,7 +45,7 @@ class Index extends Component { }} onChange={(val) => this.handleChangeSalaryMonth([val ? moment(val).format("YYYY-MM") : "", value2])} /> - + {getLabel(111, "至")} { @@ -64,7 +65,7 @@ class Index extends Component { } handleQuoteAttendanceData= ()=>{ this.attendanceTableRef.handleQuoteAttendanceData({ - visible: true, title: "引用考勤数据" + visible: true, title: getLabel(111, "引用考勤数据") }); } @@ -72,18 +73,18 @@ class Index extends Component { const { selectedKey, salaryMonth, fieldName } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; const topTab = [ - { title: "考勤数据", viewcondition: "DATA" }, - { title: "字段管理", viewcondition: "FIELD" } + { title: getLabel(111, "考勤数据"), viewcondition: "DATA" }, + { title: getLabel(111, "字段管理"), viewcondition: "FIELD" } ]; const buttons = selectedKey === "DATA" ? [ - , - - ] : []; + , + + ] : []; return (
    this.setState({ selectedKey: v })} searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })} onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js index aec25fae..f6b97208 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js @@ -1,3 +1,6 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const condition = [ { items: [ @@ -5,7 +8,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["childrenEducation"], fieldcol: 14, - label: "子女教育", + label: getLabel(111, "子女教育"), labelcol: 8, value: "", viewAttr: 2 @@ -14,7 +17,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["continuingEducation"], fieldcol: 14, - label: "继续教育", + label: getLabel(111, "继续教育"), labelcol: 8, value: "", viewAttr: 2 @@ -23,7 +26,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["housingLoanInterest"], fieldcol: 14, - label: "住房贷款利息", + label: getLabel(111, "住房贷款利息"), labelcol: 8, value: "", viewAttr: 2 @@ -32,7 +35,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["housingRent"], fieldcol: 14, - label: "住房租金", + label: getLabel(111, "住房租金"), labelcol: 8, value: "", viewAttr: 2 @@ -41,7 +44,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["supportingElder"], fieldcol: 14, - label: "赡养老人", + label: getLabel(111, "赡养老人"), labelcol: 8, value: "", viewAttr: 2 @@ -50,7 +53,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["seriousIllnessTreatment"], fieldcol: 14, - label: "大病医疗", + label: getLabel(111, "大病医疗"), labelcol: 8, value: "", viewAttr: 2 @@ -59,13 +62,13 @@ export const condition = [ conditionType: "INPUT", domkey: ["infantCare"], fieldcol: 14, - label: "婴幼儿照护", + label: getLabel(111, "婴幼儿照护"), labelcol: 8, value: "", viewAttr: 2 } ], - title: "数据采集", + title: getLabel(111, "数据采集"), defaultshow: true } ]; @@ -77,7 +80,7 @@ export const searchCondition = [ conditionType: "INPUT", domkey: ["username"], fieldcol: 16, - label: "姓名", + label: getLabel(111, "姓名"), labelcol: 8, value: "", viewAttr: 2 @@ -93,7 +96,7 @@ export const searchCondition = [ dataURL: null, isSearch: false, key: "2", - name: "组织结构", + name: getLabel(111, "组织结构"), selected: false, showOrder: 0 }, @@ -102,12 +105,12 @@ export const searchCondition = [ dataURL: null, isSearch: true, key: "1", - name: "按列表", + name: getLabel(111, "按列表"), selected: false, showOrder: 0 } ], - title: '部门', + title: getLabel(111, "部门"), type: "4", viewAttr: 2, pageSize: 10, @@ -117,7 +120,7 @@ export const searchCondition = [ iconBgcolor: "#217346" }, fieldcol: 16, - label: "部门", + label: getLabel(111, "部门"), labelcol: 8, value: "", viewAttr: 2 @@ -126,13 +129,13 @@ export const searchCondition = [ conditionType: "INPUT", domkey: ["jobNum"], fieldcol: 16, - label: "工号", + label: getLabel(111, "工号"), labelcol: 8, value: "", viewAttr: 2 } ], - title: "常用条件", + title: getLabel(111, "常用条件"), defaultshow: true } ]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 5ea6f81c..1e137f62 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSearchGroup } from "ecCom"; +import { WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import DataTables from "../dataTables"; import Layout from "../layout"; @@ -23,6 +23,7 @@ import TableRecord from "../components/tableRecord"; import { specialModalColumns } from "../cumDeduct/columns"; import { convertToUrlString } from "../../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore", "specialAddStore") @observer class Index extends Component { @@ -77,22 +78,22 @@ class Index extends Component { specialAddDeductionEditData({ ...payload, id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("编辑成功"); + message.success(getLabel(111, "编辑成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "编辑失败"); + message.error(errormsg || getLabel(111, "编辑失败")); } }); } else { specialAddDeductionCreateData(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); this.handleCloseSlide(); this.tableRef.getTableDate(); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } @@ -128,7 +129,7 @@ class Index extends Component { importPayload: { ...importPayload, slideDataSource: preview } }); } else { - message.error(errormsg || "预览失败"); + message.error(errormsg || getLabel(111, "预览失败")); } }); }; @@ -157,15 +158,15 @@ class Index extends Component { const { taxAgentId } = this.state; const payload = { taxAgentId }; Modal.confirm({ - title: "信息确认", - content: `确定清空所有专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: getLabel(111, "确定清空所有专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。"), onOk: () => { specialAddDeductionDeleteAllData(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -181,22 +182,22 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { id, departmentName, username } = record; if (ids.length === 0 && !id) { - message.warning("请选择表格数据"); + message.warning(getLabel(111, "请选择表格数据")); return; } const payload = { ids: !id ? ids : [id] }; Modal.confirm({ - title: "信息确认", - content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" : - `确定删除${departmentName}${username}的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + title: getLabel(111, "信息确认"), + content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") : + `${getLabel(111, "确定删除")}${departmentName}${username}${getLabel(111, "的累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")},${getLabel(111, "已参与核算的数据不会受影响")},${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}。`, onOk: () => { specialAddDeductionDeleteSelectData(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.tableRef.getTableDate(); this.tableRef.handleClearRows(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -226,7 +227,7 @@ class Index extends Component { const { selectedRowKeys: ids } = this.tableRef.state; const { taxAgentId, exportPayloadType } = this.state; if (ids.length === 0) { - message.warning("请选择需要导出的数据"); + message.warning(getLabel(111, "请选择需要导出的数据")); return; } this.setState({ @@ -246,10 +247,10 @@ class Index extends Component { const items = [ { com: DataCollectionSelect({ - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), value: taxAgentId, onChange: this.screenChange, - options: [{ key: "", showname: "全部" }, ...taxAgentOption], + options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption], key: "taxAgentId" }) } @@ -268,19 +269,19 @@ class Index extends Component { */ getTopBtns = () => { return [ - , - , + , + , - 批量删除 - 一键清空 - 导出选中 - 导出全部 + {getLabel(111, "批量删除")} + {getLabel(111, "一键清空")} + {getLabel(111, "导出选中")} + {getLabel(111, "导出全部")} } > - + ]; }; @@ -291,7 +292,7 @@ class Index extends Component { * Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位 * Date: 2023/2/20 */ - handleAddData = (title = "新建", editId = {}) => { + handleAddData = (title = getLabel(111, "新建"), editId = {}) => { const { taxAgentStore, specialAddStore: { addForm } } = this.props; const { slidePayload } = this.state; const { taxAgentOption } = taxAgentStore; @@ -331,7 +332,7 @@ class Index extends Component { handleTableOperate = ({ key }, record) => { const { id } = record; key === "handleAddData" ? getSpecialAddDeduction({ id }).then(({ status, data }) => { - if (status) this[key]("编辑", data); + if (status) this[key](getLabel(111, "编辑"), data); }) : this.specialAddDeductionDeleteSelectData(record); }; handleCloseSlide = () => { @@ -354,8 +355,8 @@ class Index extends Component { const bool = _.every(_.pick(baseInfo, ["taxAgentId", "employeeId"]), v => !!v); if (!bool) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -424,7 +425,7 @@ class Index extends Component { } = this.state; const tablePayload = { taxAgentId }; return ( - this.handleAddData("专项附加扣除记录", record)} + onViewDetails={(record) => this.handleAddData(getLabel(111, "专项附加扣除记录"), record)} form={advanceForm} /> From d21d9878232d35eaa2bbb3b21d0b061a384ea344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 23 May 2023 17:03:25 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalScopeModal/index.js | 49 +-- .../components/PersonalScopeTable/index.js | 5 +- pc4mobx/hrmSalary/index.js | 1 - .../pages/calculate/baseFormModal.js | 18 +- pc4mobx/hrmSalary/pages/calculate/index.js | 65 ++-- .../pages/calculateDetail/columns.js | 305 ++---------------- .../pages/calculateDetail/editSalaryDetail.js | 17 +- .../pages/calculateDetail/fileMergeDetail.js | 99 +++--- .../hrmSalary/pages/calculateDetail/index.js | 65 ++-- .../calculateDetail/issuedAndReissueTable.js | 15 +- .../calculateDetail/placeOnFileDetail.js | 31 +- .../pages/calculateDetail/salaryDetail.js | 41 +-- .../pages/calculateDetail/userSure.js | 88 ++--- .../pages/calculateDetail/warningModal.js | 13 +- .../declare/generateDeclarationDetail.js | 10 +- .../hrmSalary/pages/declare/generateModal.js | 19 +- pc4mobx/hrmSalary/pages/declare/index.js | 15 +- .../fieldManagement/components/fieldSlide.js | 29 +- .../fieldManagement/components/fieldTable.js | 12 +- .../hrmSalary/pages/fieldManagement/index.js | 23 +- .../LedgerBackCalculatedSalaryItemTable.js | 14 +- .../ledgerPage/components/categoryAddModal.js | 7 +- .../ledgerPage/components/copyLedgerModal.js | 12 +- .../components/ledgerAdjustRuleAddModal.js | 46 +-- .../components/ledgerAssociatedPersonnel.js | 24 +- .../components/ledgerBackCalcEditSlide.js | 23 +- .../ledgerBackCalculatedSalaryItem.js | 16 +- .../components/ledgerBaseSetting.js | 50 +-- .../ledgerPage/components/ledgerMovoTo.js | 8 +- .../components/ledgerSalaryAdjustmentRules.js | 28 +- .../ledgerPage/components/ledgerSalaryItem.js | 7 +- .../components/ledgerSalaryItemAddModal.js | 11 +- .../components/ledgerSalaryItemBaseInfo.js | 9 +- .../components/ledgerSalaryItemNormal.js | 35 +- .../ledgerSalaryItemPreviewModal.js | 5 +- .../components/ledgerSalaryItemTable.js | 21 +- .../ledgerPage/components/ledgerSlide.js | 59 ++-- .../ledgerPage/components/ledgerTable.js | 31 +- pc4mobx/hrmSalary/pages/ledgerPage/config.js | 265 +++++++-------- pc4mobx/hrmSalary/pages/ledgerPage/index.js | 16 +- .../hrmSalary/pages/payroll/SalarySendList.js | 20 +- .../payroll/components/backgroundUpload.js | 6 +- pc4mobx/hrmSalary/pages/payroll/copyModal.js | 13 +- pc4mobx/hrmSalary/pages/payroll/index.js | 84 ++--- .../pages/payroll/payrollDetail/index.js | 33 +- .../pages/payroll/payrollGrant/index.js | 80 ++--- .../payroll/payrollGrant/payrollPartModal.js | 34 +- .../payroll/payrollGrant/payrollPartTable.js | 21 +- .../pages/payroll/stepForm/baseInformForm.js | 19 +- .../pages/payroll/stepForm/salaryItemModal.js | 8 +- .../payroll/stepForm/salaryItemSettings.js | 19 +- .../pages/payroll/stepForm/showSettingForm.js | 32 +- .../payroll/stepForm/tmplateSettingForm.js | 8 +- .../pages/salaryItem/formalFormModal.js | 46 +-- pc4mobx/hrmSalary/pages/salaryItem/options.js | 147 ++++----- .../hrmSalary/pages/salaryItem/testModal.js | 23 +- .../components/regAddEmployee.js | 2 +- .../hrmSalary/pages/sysConfig/conditions.js | 21 +- pc4mobx/hrmSalary/pages/sysConfig/index.js | 44 +-- .../pages/taxAgent/addTaxAgentModal.js | 43 +-- pc4mobx/hrmSalary/pages/taxAgent/columns.js | 23 +- .../pages/taxAgent/editConditions.js | 39 +-- pc4mobx/hrmSalary/pages/taxAgent/editModal.js | 22 +- pc4mobx/hrmSalary/pages/taxAgent/index.js | 69 ++-- .../hrmSalary/pages/taxAgent/personalScope.js | 15 +- .../pages/taxAgent/slideTaxagentUser.js | 18 +- pc4mobx/hrmSalary/pages/taxRate/columns.js | 215 ++++++------ .../pages/taxRate/editSlideContent.js | 184 ++++++----- pc4mobx/hrmSalary/pages/taxRate/index.js | 30 +- 69 files changed, 1396 insertions(+), 1529 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 1668de36..464ec625 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -5,12 +5,13 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; class PersonalScopeModal extends Component { constructor(props) { super(props); @@ -32,33 +33,33 @@ class PersonalScopeModal extends Component { this.getTaxAgentRangeForm(); } else { const employeeStatus = [ - { key: "TRIAL", showname: "试用" }, - { key: "FORMAL", showname: "正式" }, - { key: "TEMPORARY", showname: "临时" }, - { key: "DELAY", showname: "试用延期" }, - { key: "FIRE", showname: "解雇" }, - { key: "DEPARTURE", showname: "离职" }, - { key: "RETIRED", showname: "退休" } + { key: "TRIAL", showname: getLabel(111, "试用") }, + { key: "FORMAL", showname: getLabel(111, "正式") }, + { key: "TEMPORARY", showname: getLabel(111, "临时") }, + { key: "DELAY", showname: getLabel(111, "试用延期") }, + { key: "FIRE", showname: getLabel(111, "解雇") }, + { key: "DEPARTURE", showname: getLabel(111, "离职") }, + { key: "RETIRED", showname: getLabel(111, "退休") } ]; const targetTypeList = [ { key: "EMPLOYEE", - showname: "人员", + showname: getLabel(111, "人员"), selected: false }, { key: "SUBCOMPANY", - showname: "分部", + showname: getLabel(111, "分部"), selected: false }, { key: "DEPT", - showname: "部门", + showname: getLabel(111, "部门"), selected: false }, { key: "POSITION", - showname: "岗位", + showname: getLabel(111, "岗位"), selected: false } ]; @@ -82,8 +83,8 @@ class PersonalScopeModal extends Component { const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox } = this.props; if (_.isEmpty(status) || _.isEmpty(targetTypeIds)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -97,12 +98,12 @@ class PersonalScopeModal extends Component { APISaveFox["save"](payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); this.handleReset(); onSuccess(); onCancel(); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: true })); }; @@ -111,16 +112,16 @@ class PersonalScopeModal extends Component { let browserType = {}; switch (targetType) { case "EMPLOYEE": - browserType = { ...browserType, type: 17, title: "人员选择" }; + browserType = { ...browserType, type: 17, title: getLabel(111, "人员选择") }; break; case "DEPT": - browserType = { ...browserType, type: 57, title: "部门选择" }; + browserType = { ...browserType, type: 57, title: getLabel(111, "部门选择") }; break; case "SUBCOMPANY": - browserType = { ...browserType, type: 164, title: "分部选择" }; + browserType = { ...browserType, type: 164, title: getLabel(111, "分部选择") }; break; case "POSITION": - browserType = { ...browserType, type: 278, title: "岗位选择" }; + browserType = { ...browserType, type: 278, title: getLabel(111, "岗位选择") }; break; default: break; @@ -150,8 +151,8 @@ class PersonalScopeModal extends Component { const { onCancel, title, visible } = this.props; const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state; const buttons = [ - , - + , + ]; return ( @@ -184,7 +185,7 @@ class PersonalScopeModal extends Component { { SelectWithAll({ - label: "选择员工状态", + label: getLabel(111, "选择员工状态"), options: employeeStatus, detailtype: 2, valueAll: statusAll, diff --git a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js index 8b38ba01..0cadad5f 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeTable/index.js @@ -5,10 +5,11 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaTable, WeaLocaleProvider } from "ecCom"; import { calcPageNo } from "../../util"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; class PersonalScopeTable extends Component { constructor(props) { super(props); @@ -95,7 +96,7 @@ class PersonalScopeTable extends Component { const { onChangeSelectKey } = this.props; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 7e2c3fbd..602b26f8 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -116,7 +116,6 @@ const Routes = ( - {/*系统语言改造截止处*/} { this.handleSave(); }} - >保存 + >{getLabel(111, "保存")} ]} > - 薪酬所属月 + {getLabel(111, "薪酬所属月")} + error={getLabel(111, "请选择薪酬所属月")}> - 核算账套 + {getLabel(111, "核算账套")} { this.state.inited && @@ -135,7 +135,7 @@ export default class baseFormModal extends React.Component { style={{ width: "100%" }} tipPosition="bottom" ref="weaError1" - error="请选择账套"> + error={getLabel(111, "请选择账套")}> - 备注 + {getLabel(111, "备注")} this.setState({ description: value })}/> diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index fda59a8d..3b3a44e9 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -1,8 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd"; -import { WeaInputSearch, WeaNewScroll, WeaTop } from "ecCom"; -import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { WeaInputSearch, WeaNewScroll, WeaTop, WeaLocaleProvider } from "ecCom"; +import { renderNoright } from "../../util"; import CustomTab from "../../components/customTab"; import moment from "moment"; import BaseFormModal from "./baseFormModal"; @@ -12,6 +12,7 @@ import "./index.less"; const MonthPicker = DatePicker.MonthPicker; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "taxAgentStore") @observer export default class Calculate extends React.Component { @@ -78,8 +79,8 @@ export default class Calculate extends React.Component { // 列表项删除回调 handleDeleteItem(record) { Modal.confirm({ - title: "信息确认", - content: "确认删除本条数据吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除本条数据吗?"), onOk: () => { const { calculateStore: { deleteSalaryacct } } = this.props; deleteSalaryacct([record.id]).then(() => { @@ -108,7 +109,7 @@ export default class Calculate extends React.Component { progressVisible: false, progress: 0 }, () => { - message.success("归档成功"); + message.success(getLabel(111, "归档成功")); this.handleSearch(this.state.searchValue); }); } @@ -120,7 +121,7 @@ export default class Calculate extends React.Component { progressVisible: false, progress: 0 }, () => { - message.success("归档成功"); + message.success(getLabel(111, "归档成功")); this.handleSearch(this.state.searchValue); }); }).catch(() => { @@ -143,8 +144,8 @@ export default class Calculate extends React.Component { // 回算 handleBackCalculate = (record) => { Modal.confirm({ - title: "信息确认", - content: "确定回算吗?\n 回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确定回算吗?\n 回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!"), onOk: () => { const { calculateStore: { backCalculate } } = this.props; backCalculate(record.id).then(() => { @@ -178,22 +179,22 @@ export default class Calculate extends React.Component {
    { record.backCalcStatus === 1 && - + } - {`第${record.acctTimes}次`} + {`${getLabel(111, "第")}${record.acctTimes}${getLabel(111, "次")}`}
    ; }; } - if (item.title == "操作" && showOperateBtn) { + if (item.title == getLabel(111, "操作") && showOperateBtn) { item.render = (text, record) => { const accountBtn = _.filter( record.operate, - it => it.text == "核算" || it.text == "重新核算" + it => it.text == getLabel(111, "核算") || it.text == getLabel(111, "重新核算") ); const notAccountBtn = _.filter( record.operate, - it => it.text != "核算" && it.text != "重新核算" + it => it.text != getLabel(111, "核算") && it.text != getLabel(111, "重新核算") ); let operateBtn = []; if (!_.isEmpty(accountBtn)) { @@ -207,8 +208,8 @@ export default class Calculate extends React.Component { { - if (it.text == "核算" || it.text == "重新核算") { - it.text == "核算" + if (it.text == getLabel(111, "核算") || it.text == getLabel(111, "重新核算")) { + it.text == getLabel(111, "核算") ? this.handleAccount(record) : this.handleReaccount(record); } @@ -229,17 +230,17 @@ export default class Calculate extends React.Component { { - if (cz.text == "核算") { + if (cz.text == getLabel(111, "核算")) { this.handleAccount(record); - } else if (cz.text == "删除") { + } else if (cz.text == getLabel(111, "删除")) { this.handleDeleteItem(record); - } else if (cz.text == "归档") { + } else if (cz.text == getLabel(111, "归档")) { this.handleFile(record); - } else if (cz.text == "重新核算") { + } else if (cz.text == getLabel(111, "重新核算")) { this.handleReaccount(record); - } else if (cz.text == "查看") { + } else if (cz.text == getLabel(111, "查看")) { this.handleDetail(record); - } else if (cz.text == "回算") { + } else if (cz.text == getLabel(111, "回算")) { this.handleBackCalculate(record); } }}> @@ -260,7 +261,7 @@ export default class Calculate extends React.Component { }; } }); - return showOperateBtn ? columns : _.filter(columns, it => it.title != "操作"); + return showOperateBtn ? columns : _.filter(columns, it => it.title != getLabel(111, "操作")); }; // 分页 @@ -315,13 +316,13 @@ export default class Calculate extends React.Component { { key: "BTN_COLUMN", icon: , - content: "显示列定制", + content: getLabel(111, "显示列定制"), onClick: this.showColumn } ]; const collectParams = { // 收藏功能配置 - favname: "薪资核算", + favname: getLabel(111, "薪资核算"), favouritetype: 1, objid: 0, link: "wui/index.html#/ns_demo03/index", @@ -330,13 +331,13 @@ export default class Calculate extends React.Component { const adBtn = [ // 高级搜索内部按钮 , , ]; @@ -352,7 +353,7 @@ export default class Calculate extends React.Component { onClick={() => { this.setState({ baseFormVisible: true }); }}> - 核算 + {getLabel(111, "核算")} }
    @@ -364,7 +365,7 @@ export default class Calculate extends React.Component { }} onChange={(val) => this.handleRangePickerChange("startDate", val)} /> - + {getLabel(111, "至")} { this.setState({ searchValue: value }); }} @@ -393,7 +394,7 @@ export default class Calculate extends React.Component {
    {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 @@ -425,7 +426,7 @@ export default class Calculate extends React.Component { { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/columns.js b/pc4mobx/hrmSalary/pages/calculateDetail/columns.js index 8751a73e..4ac59335 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/columns.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/columns.js @@ -1,331 +1,68 @@ -export const userSureColumns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "人员类型", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "工号", - dataIndex: 'title', - key: 'title', - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title', - }, - { - title: "入职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "离职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'cz', - key: 'cz', - } -] - -export const monthOnMonthColumns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "减少类型", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "工号", - dataIndex: 'title', - key: 'title', - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title', - }, - { - title: "入职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "离职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'cz', - key: 'cz' - }, - -] - -export const salaryDetailColumns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title' - }, - { - title: "人员类型", - dataIndex: 'title', - key: 'title' - }, - { - title: "部门", - dataIndex: 'title', - key: 'title' - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title' - }, - { - title: "工号", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目1", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目2", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目3", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目4", - dataIndex: 'title', - key: 'title' - }, - { - title: "操作", - dataIndex: 'cz', - key: 'cz' - } -] +import { WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export const warningModalColumns = [ { - title: "异常所属规则名称", - dataIndex: 'title', - key: 'title' - }, - - { - title: "异常人数", + title: getLabel(111, "异常所属规则名称"), dataIndex: 'title', key: 'title' }, - { - title: "校验规则", + title: getLabel(111, "异常人数"), dataIndex: 'title', key: 'title' }, - + + { - title: "操作", + title: getLabel(111, "校验规则"), + dataIndex: 'title', + key: 'title' + }, + + { + title: getLabel(111, "操作"), dataIndex: 'cz', key: 'cz' } ] -export const placeOnFileColumns = [ - { - title: "姓名", - dataIndex: 'username', - key: 'username' - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title' - }, - { - title: "人员类型", - dataIndex: 'title', - key: 'title' - }, - { - title: "部门", - dataIndex: 'title', - key: 'title' - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title' - }, - { - title: "工号", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目1", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目2", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目3", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目4", - dataIndex: 'title', - key: 'title' - } -] - export const mergeDetailColumns = [ { - title: "核算次序", + title: getLabel(111, "核算次序"), dataIndex: 'title', key: 'title' }, { - title: "薪资项目1", + title: getLabel(111, "薪资项目1"), dataIndex: 'title', key: 'title' }, { - title: "薪资项目2", + title: getLabel(111, "薪资项目2"), dataIndex: 'title', key: 'title' }, { - title: "薪资项目3", + title: getLabel(111, "薪资项目3"), dataIndex: 'title', key: 'title' }, { - title: "薪资项目4", + title: getLabel(111, "薪资项目4"), dataIndex: 'title', key: 'title' }, ] -export const compareColumn = [ - { - title: "异常人员", - dataIndex: 'title', - key: 'title' - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title' - }, - { - title: "人员类型", - dataIndex: 'title', - key: 'title' - }, - { - title: "部门", - dataIndex: 'title', - key: 'title' - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title' - }, - { - title: "工号", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目1", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目2", - dataIndex: 'title', - key: 'title' - }, - { - title: "薪资项目3", - dataIndex: 'title', - key: 'title' - } -] - export const dataSource = [ { - title: "测试", - username: "测试" - } + title: getLabel(111, "测试"), + username: getLabel(111, "测试") + } ]; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js index 075c55a1..aaccce41 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaHelpfulTip, WeaInput, WeaTab } from "ecCom"; +import { WeaHelpfulTip, WeaInput, WeaTab, WeaLocaleProvider } from "ecCom"; import IssuedAndReissueTable from "./issuedAndReissueTable"; import { Col, Row } from "antd"; import { inject, observer } from "mobx-react"; @@ -7,6 +7,7 @@ import { toJS } from "mobx"; import cs from "classnames"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore") @observer export default class EditSalaryDetail extends React.Component { @@ -83,11 +84,11 @@ export default class EditSalaryDetail extends React.Component { const { selectedKey } = this.state; const topTab = [ { - title: "正常工资薪金所得", + title: getLabel(111, "正常工资薪金所得"), viewcondition: "0" }, { - title: "已发补发", + title: getLabel(111, "已发补发"), viewcondition: "1" } ]; @@ -95,11 +96,11 @@ export default class EditSalaryDetail extends React.Component {
    - 基本信息 + {getLabel(111, "基本信息")}
    @@ -126,7 +127,7 @@ export default class EditSalaryDetail extends React.Component { selectedKey === "0" &&
    - 输入项 + {getLabel(111, "输入项")}
    { @@ -153,11 +154,11 @@ export default class EditSalaryDetail extends React.Component {
    - 公式项 + {getLabel(111, "公式项")} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/fileMergeDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/fileMergeDetail.js index 2f50e9cc..67466bec 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/fileMergeDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/fileMergeDetail.js @@ -1,28 +1,29 @@ import React from 'react'; import { mergeDetailColumns, dataSource} from './columns' import { Row, Col, Table } from 'antd' -import { WeaHelpfulTip } from "ecCom" +import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom" +const getLabel = WeaLocaleProvider.getLabel; export default class FileMergeDetail extends React.Component { render() { return (
    - 基本信息 + {getLabel(111, "基本信息")}
    - 薪资所属月:2021-11 + {getLabel(111, "薪资所属月")}:2021-11
    @@ -32,66 +33,66 @@ export default class FileMergeDetail extends React.Component { - 姓名 - 张三 - - - - - - 部门 - 研发 - + {getLabel(111, "姓名")} + {getLabel(111, "张三")} + - - 岗位 - 开发 - + {getLabel(111, "部门")} + {getLabel(111, "研发")} + + + + + + + {getLabel(111, "岗位")} + {getLabel(111, "开发")} + - + - 入职日期 + {getLabel(111, "入职日期")} 2020-10-20 - - - - - - 手机号 - 18888888888 - + - - 个税扣缴义务人 - 义务人一 - + {getLabel(111, "手机号")} + 18888888888 + + + + + + + {getLabel(111, "个税扣缴义务人")} + {getLabel(111, "义务人一")} +
    - 合并计税详情 + {getLabel(111, "合并计税详情")}
    @@ -102,4 +103,4 @@ export default class FileMergeDetail extends React.Component {
    ) } -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 0f857405..88a787ae 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -3,13 +3,24 @@ import UserSure from "./userSure"; import { inject, observer } from "mobx-react"; import SalaryDetail from "./salaryDetail"; import { Button, Dropdown, Menu, message, Modal } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom"; +import { + WeaBrowser, + WeaCheckbox, + WeaDropdown, + WeaFormItem, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTab +} from "ecCom"; import { convertToUrlString, getQueryString } from "../../util/url"; import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal"; import ProgressModal from "../../components/progressModal"; const { ButtonSelect } = WeaDropdown; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "salaryFileStore") @observer export default class CalculateDetail extends React.Component { @@ -103,8 +114,8 @@ export default class CalculateDetail extends React.Component { this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> @@ -118,7 +129,7 @@ export default class CalculateDetail extends React.Component { labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} > - this.setState({ + this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val @@ -133,12 +144,12 @@ export default class CalculateDetail extends React.Component { const { calculateStore } = this.props; const { acctresultAccounting, getCalculateProgress } = calculateStore; if (key === "SELECT" && _.isEmpty(this.state.accountIds)) { - message.warning("请先选择表格数据"); + message.warning(getLabel(111, "请先选择表格数据")); return; } Modal.confirm({ - title: "信息确认", - content: "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据", + title: getLabel(111, "信息确认"), + content: getLabel(111, "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据"), onOk: () => { this.setState({ progress: 0 }); let payload = { salaryAcctRecordId: this.id }; @@ -162,7 +173,7 @@ export default class CalculateDetail extends React.Component { progressVisible: false, accountIds: [] }); - message.success("核算完成"); + message.success(getLabel(111, "核算完成")); // acctResultList({ salaryAcctRecordId: this.id }); const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); @@ -250,9 +261,9 @@ export default class CalculateDetail extends React.Component { const { selectedKey, acctResultImportVisiable, showSearchAd } = this.state; const menu = ( - 导入 - 线下对比 - 导出全部 + {getLabel(111, "导入")} + {getLabel(111, "线下对比")} + {getLabel(111, "导出全部")} ); @@ -260,25 +271,25 @@ export default class CalculateDetail extends React.Component { return [ this.handleAccount(key)} />, - 更多 + {getLabel(111, "更多")} ]; }; const topTab = [ { - title: "人员确认", + title: getLabel(111, "人员确认"), viewcondition: "0" }, { - title: "薪资核算", + title: getLabel(111, "薪资核算"), viewcondition: "1" } ]; @@ -290,7 +301,7 @@ export default class CalculateDetail extends React.Component { this.handleSearch(this.state.searchItemsValue); }); }}> - 搜索 + {getLabel(111, "搜索")} , , ]; const renderSearch = () => { const searchItems = [ - { com: this.Input("姓名", "employeeName") }, - { com: this.Browser("分部", "subcompanyIds") }, - { com: this.Browser("部门", "departmentIds") }, - { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("状态", "status") }, - { com: this.Checkbox("合并计税", "consolidatedTaxation") } + { com: this.Input(getLabel(111, "姓名"), "employeeName") }, + { com: this.Browser(getLabel(111, "分部"), "subcompanyIds") }, + { com: this.Browser(getLabel(111, "部门"), "departmentIds") }, + { com: this.Browser(getLabel(111, "岗位"), "positionIds") }, + { com: this.Select(getLabel(111, "状态"), "status") }, + { com: this.Checkbox(getLabel(111, "合并计税"), "consolidatedTaxation") } ]; - return ; + return ; }; return ( @@ -334,7 +345,7 @@ export default class CalculateDetail extends React.Component { buttonsAd={adBtn} // 高级搜索内部按钮 onSearch={() => this.handleSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调 buttons={selectedKey == 1 ? renderRightOperation() : []} - searchsBasePlaceHolder={"请输入姓名"} + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} onSearchChange={(v) => this.setState({ searchItemsValue: { diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js b/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js index f18e620f..2e23fe48 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/issuedAndReissueTable.js @@ -5,15 +5,16 @@ * Date: 2022/12/14 */ import React, { Component } from "react"; -import { WeaHelpfulTip, WeaInputNumber, WeaTable } from "ecCom"; +import { WeaHelpfulTip, WeaInputNumber, WeaTable, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; class IssuedAndReissueTable extends Component { render() { const { dataSource, onChangeIssueReissueValue } = this.props; const columns = [ { dataIndex: "salaryItemName", - title: "薪资项目", + title: getLabel(111, "薪资项目"), render: (text) => { return {text}; } @@ -21,9 +22,9 @@ class IssuedAndReissueTable extends Component { { dataIndex: "resultValue", title: - 项目值 + {getLabel(111, "项目值")} @@ -42,15 +43,15 @@ class IssuedAndReissueTable extends Component { { dataIndex: "salaryBackItemFormula", title: - 核算公式 + {getLabel(111, "核算公式")} , render: (text, record) => { - return {_.isNil(text) ? "输入" : text}; + return {_.isNil(text) ? getLabel(111, "输入") : text}; } } ]; diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js index 0ad0478a..7ebf4793 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js @@ -1,13 +1,14 @@ import React from "react"; import CustomTab from "../../components/customTab"; import { Dropdown, Menu, message } from "antd"; -import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom"; +import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../components/slideModalTitle"; import FileMergeDetail from "./fileMergeDetail"; import { getQueryString } from "../../util/url"; import { inject, observer } from "mobx-react"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore") @observer export default class PlaceOnFileDetail extends React.Component { @@ -42,7 +43,7 @@ export default class PlaceOnFileDetail extends React.Component { if (type === "PR") { if (id === "BATCHDELETE") { this.setState({ selectedRowKeys: record }); - }else if (id === "PAGEINFO") { + } else if (id === "PAGEINFO") { const { pageNum: current, size: pageSize } = record; this.pageInfo = { current, pageSize }; const payload = { @@ -93,7 +94,7 @@ export default class PlaceOnFileDetail extends React.Component { const { calculateStore: { exportAll } } = this.props; const { selectedRowKeys } = this.state; if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } exportAll(this.id, selectedRowKeys.join(",")); @@ -112,7 +113,7 @@ export default class PlaceOnFileDetail extends React.Component { const menu = ( this.handleMenuClick(e)}> - 导出所选 + {getLabel(111, "导出所选")} ); @@ -121,8 +122,8 @@ export default class PlaceOnFileDetail extends React.Component {
    { this.handleExportAll(); - }} overlay={menu}>导出全部 - { + }} overlay={menu}>{getLabel(111, "导出全部")} + { this.setState({ searchValue: value }); }} value={this.state.searchValue} onSearch={(value) => { this.handleSearch(value); @@ -140,17 +141,17 @@ export default class PlaceOnFileDetail extends React.Component { } />
    - 薪资所属月:{baseSalarySobCycle.salaryMonth} + {getLabel(111, "薪资所属月")}:{baseSalarySobCycle.salaryMonth}
    @@ -173,7 +174,7 @@ export default class PlaceOnFileDetail extends React.Component { measure={"%"} title={ } diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index 6c018985..cae3aff5 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaHelpfulTip, WeaSlideModal } from "ecCom"; +import { WeaHelpfulTip, WeaSlideModal, WeaLocaleProvider } from "ecCom"; import { message, Modal } from "antd"; import WarningModal from "./warningModal"; import EditSalaryDetail from "./editSalaryDetail"; @@ -10,6 +10,7 @@ import { toJS } from "mobx"; import "./index.less"; import ProgressModal from "../../components/progressModal"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "taxAgentStore") @observer export default class SalaryDetail extends React.Component { @@ -59,11 +60,11 @@ export default class SalaryDetail extends React.Component { this.setState({ columnIndex: record }); } else if (extraId === "LOCK") { Modal.confirm({ - title: "信息确认", + title: getLabel(111, "信息确认"), content:
    -
    确定要批量锁定项目值吗?
    +
    {getLabel(111, "确定要批量锁定项目值吗?")}
    确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算! + style={{ textAlign: "center" }}>{getLabel(111, "确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算!")}
    , onOk: () => this.updateLockStatus("LOCK", record), @@ -72,11 +73,11 @@ export default class SalaryDetail extends React.Component { }); } else if (extraId === "UNLOCK") { Modal.confirm({ - title: "信息确认", + title: getLabel(111, "信息确认"), content:
    -
    确定要批量解锁项目值吗?
    +
    {getLabel(111, "确定要批量解锁项目值吗?")}
    确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识! + style={{ textAlign: "center" }}>{getLabel(111, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
    , onOk: () => this.updateLockStatus("UNLOCK", record), @@ -138,7 +139,7 @@ export default class SalaryDetail extends React.Component { progressVisible: false, progress: 0 }, () => { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); }); } }, 500); @@ -163,7 +164,7 @@ export default class SalaryDetail extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); }); } else { - message.error(errormsg || "操作失败"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -209,19 +210,19 @@ export default class SalaryDetail extends React.Component { return (
    - 薪资所属月:{baseSalarySobCycle.salaryMonth} + {getLabel(111, "薪资所属月")}:{baseSalarySobCycle.salaryMonth} {/*暂时隐藏*/} @@ -230,7 +231,7 @@ export default class SalaryDetail extends React.Component { {/*}}>校验异常:0*/}
    - 公式= + {getLabel(111, "公式")}= {toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}
    @@ -248,7 +249,7 @@ export default class SalaryDetail extends React.Component { { this.state.progressVisible && { this.setState({ progressVisible: false, progress: 0 }); @@ -268,7 +269,7 @@ export default class SalaryDetail extends React.Component { measure={"%"} title={ this.handleEditSlideSave()} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index e74a8d8a..1a39ad77 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -1,10 +1,20 @@ import React from "react"; import { Button, Col, Icon, message, Modal, Row } from "antd"; -import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom"; +import { + WeaBrowser, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTab +} from "ecCom"; import { inject, observer } from "mobx-react"; import "./index.less"; import { getQueryString } from "../../util/url"; +const getLabel = WeaLocaleProvider.getLabel; @inject("calculateStore", "salaryFileStore") @observer export default class UserSure extends React.Component { @@ -86,8 +96,8 @@ export default class UserSure extends React.Component { this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> @@ -168,7 +178,7 @@ export default class UserSure extends React.Component { calculateStore: { saveAcctemployee, checkTaxAgent } } = this.props; saveAcctemployee(this.id, idList).then(() => { - message.success("添加成功"); + message.success(getLabel(111, "添加成功")); const payload = { type: "PC", listType: "SA", @@ -205,17 +215,17 @@ export default class UserSure extends React.Component { calculateStore: { deleteAcctemployee } } = this.props; if (selectedRowKeys.length == 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } Modal.confirm({ - title: "信息确认", - content: "确认删除", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除吗?"), onOk: () => { const childFrameObj = document.getElementById("atdTable"); const salaryAcctRecordId = getQueryString("id"); deleteAcctemployee(this.id, selectedRowKeys).then(() => { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); const payload = { type: "PC", listType: "SA", @@ -241,8 +251,8 @@ export default class UserSure extends React.Component { calculateStore: { deleteAcctemployee } } = this.props; Modal.confirm({ - title: "信息确认", - content: "确认删除", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除吗?"), onOk: () => { deleteAcctemployee(this.id, [record.id]).then(() => { const childFrameObj = document.getElementById("atdTable"); @@ -333,7 +343,7 @@ export default class UserSure extends React.Component { this.handleUserListSearch(this.state.searchItemsValue); }); }}> - 搜索 + {getLabel(111, "搜索")} , , ]; const renderSearch = () => { const searchItems = [ - { com: this.Input("姓名", "employeeName") }, - { com: this.Browser("部门", "departmentIds") }, - { com: this.Browser("岗位", "positionIds") }, - { com: this.Select("状态", "status") } + { com: this.Input(getLabel(111, "姓名"), "employeeName") }, + { com: this.Browser(getLabel(111, "部门"), "departmentIds") }, + { com: this.Browser(getLabel(111, "岗位"), "positionIds") }, + { com: this.Select(getLabel(111, "状态"), "status") } ]; - return ; + return ; }; return (
    -
    基本信息
    +
    {getLabel(111, "基本信息")}
    - 薪资所属月: @@ -386,7 +396,7 @@ export default class UserSure extends React.Component { - 核算账套: + {getLabel(111, "核算账套:")} {calculateBaseForm.formDTO && calculateBaseForm.formDTO.salarySobName} @@ -397,7 +407,7 @@ export default class UserSure extends React.Component { - 备注: + {getLabel(111, "备注")}: {calculateBaseForm.formDTO && calculateBaseForm.formDTO.description} @@ -430,11 +440,11 @@ export default class UserSure extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage }); }}> - 核算人员范围 + {getLabel(111, "核算人员范围")} | @@ -460,11 +470,11 @@ export default class UserSure extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); }); }}> - 环比上月减少人员 + {getLabel(111, "环比上月减少人员")} | @@ -490,11 +500,11 @@ export default class UserSure extends React.Component { childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); }); }}> - 环比上月增加人员 + {getLabel(111, "环比上月增加人员")}
    @@ -514,17 +524,17 @@ export default class UserSure extends React.Component { onClick={() => { this.handleBatchDelete(); }} - title="批量删除" + title={getLabel(111, "批量删除")} />, this.handleUserBrowserChange(ids)}> , @@ -534,7 +544,7 @@ export default class UserSure extends React.Component { this.handleExport(); }} style={{ fontSize: 20, position: "relative", top: 2 }} - title="导出" + title={getLabel(111, "导出")} /> // ]} - searchsBasePlaceHolder={"请输入姓名"} + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} onSearchChange={(v) => this.setState({ searchItemsValue: { diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/warningModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/warningModal.js index ac7a2e6a..7b8f507e 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/warningModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/warningModal.js @@ -1,15 +1,16 @@ import React from "react"; import {Button, Dropdown, Menu, Modal, Table} from "antd"; +import { WeaLocaleProvider } from "ecCom"; import {dataSource, warningModalColumns} from "./columns"; - +const getLabel = WeaLocaleProvider.getLabel; export default class WarningModal extends React.Component { render() { const menu = ( - 导出所选 + {getLabel(111, "导出所选")} ); return ( @@ -17,10 +18,10 @@ export default class WarningModal extends React.Component { this.props.onCancel(); }}>
    - 验证结果 + {getLabel(111, "验证结果")}
    - 导出全部 - + {getLabel(111, "导出全部")} +
    @@ -29,4 +30,4 @@ export default class WarningModal extends React.Component { ); } -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js index cdfe5a73..e0b57d4f 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js +++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js @@ -4,9 +4,11 @@ import { inject, observer } from "mobx-react"; import { getQueryString } from "../../util/url"; import * as API from "../../apis/declare"; import { Button } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import UnifiedTable from "../../components/UnifiedTable"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer export default class GenerateDeclarationDetail extends React.Component { @@ -86,21 +88,21 @@ export default class GenerateDeclarationDetail extends React.Component { const renderRightOperation = () => { return (
    - +
    ); }; const renderLeftOperation = () => { return (
    - 薪资所属月:{declareInfo.salaryMonth} - 个税扣缴义务人:{declareInfo.taxAgentName} + {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth} + {getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}
    ); }; const pagination = { ...pageInfo, - showTotal: (total) => `共 ${total} 条`, + showTotal: (total) => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showSizeChanger: true, showQuickJumper: true, diff --git a/pc4mobx/hrmSalary/pages/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index a8f41b37..94658395 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -1,9 +1,10 @@ import React from "react"; -import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom"; +import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect } from "ecCom"; import { Button } from "antd"; import { inject, observer } from "mobx-react"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("declareStore", "taxAgentStore") @observer export default class GenerateModal extends React.Component { @@ -55,11 +56,11 @@ export default class GenerateModal extends React.Component { className="generateWapper" title={ - 申报 + {getLabel(111, "申报")} @@ -69,12 +70,12 @@ export default class GenerateModal extends React.Component { type="primary" loading={loading} onClick={this.handleGenerate}> - 生成申报表 + {getLabel(111, "生成申报表")} ] }>
    @@ -82,7 +83,7 @@ export default class GenerateModal extends React.Component { style={{ width: "100%" }} tipPosition="bottom" ref="weaError" - error="请选择薪资所属月"> + error={getLabel(111, "请选择薪资所属月")}> @@ -104,7 +105,7 @@ export default class GenerateModal extends React.Component { style={{ width: "100%" }} tipPosition="bottom" ref="weaError1" - error="请选择个税扣缴义务人"> + error={getLabel(111, "请选择个税扣缴义务人")}> diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index b56d1f1a..8a447b29 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -1,13 +1,14 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, DatePicker } from "antd"; -import { WeaNewScroll, WeaTop } from "ecCom"; +import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom"; import CustomTab from "../../components/customTab"; import CustomTable from "../../components/customTable"; import GenerateModal from "./generateModal"; import { getDeclareList } from "../../apis/declare"; import moment from "moment"; +const getLabel = WeaLocaleProvider.getLabel; const { MonthPicker } = DatePicker; @inject("taxAgentStore") @observer @@ -94,7 +95,7 @@ export default class Declare extends React.Component { format="YYYY-MM" onChange={(val) => this.handleRangePickerChange("startDate", val)} /> - + {getLabel(111, "至")} { @@ -111,7 +112,7 @@ export default class Declare extends React.Component { onClick={() => { this.setState({ declarationModalVisible: true }); }}> - 生成申报单 + {getLabel(111, "生成申报单")} }
    @@ -120,7 +121,7 @@ export default class Declare extends React.Component { return (
    - } + } iconBgcolor="#F14A2D" showDropIcon={false} > @@ -131,7 +132,7 @@ export default class Declare extends React.Component { columns={[ ...columns, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "operate", render: (text, record) => { return ( @@ -142,7 +143,7 @@ export default class Declare extends React.Component { record.id ); }}> - 查看 + {getLabel(111, "查看")} ); } @@ -154,7 +155,7 @@ export default class Declare extends React.Component { this.handleDataPageChange(value); }, total: pageInfo.total, - showTotal: (total) => `共 ${total} 条`, + showTotal: (total) => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, current: pageInfo.current, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js index 9e4370ca..b3714231 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js @@ -6,13 +6,14 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaLocaleProvider } from "ecCom"; import { message, Modal } from "antd"; import SlideModalTitle from "../../../components/slideModalTitle"; import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage"; import { commonEnumList } from "../../../apis/payrollFiles"; import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer class FieldSlide extends Component { @@ -108,8 +109,8 @@ class FieldSlide extends Component { saveFieldInfo = () => { if (_.isEmpty(this.state.name) || (this.state.sharedType === "1" && _.isEmpty(this.state.taxAgentIds))) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return false; } @@ -143,9 +144,9 @@ class FieldSlide extends Component { onRefreshList(); onCancel(); this.handleReset(); - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -214,7 +215,7 @@ class FieldSlide extends Component { } content={
    - + this.handleChangeFields("name", value)}/> @@ -232,18 +233,18 @@ class FieldSlide extends Component { {/* />*/} {/* */} {/*}*/} - + this.handleChangeFields("useDefault", value)} /> - + { sharedType === "1" && - + } - + this.handleChangeFields("dataType", value)} /> - + this.handleChangeFields("roundingMode", value)} /> - + this.handleChangeFields("pattern", value)} /> - + this.handleChangeFields("description", value)} diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js index 3d68c4b9..b9bf0a70 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js @@ -5,11 +5,13 @@ * Date: 2023/1/19 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import { Switch } from "antd"; import { salaryFieldList } from "../../../apis/fieldManage"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class FieldTable extends Component { @@ -60,7 +62,7 @@ class FieldTable extends Component { dataIndex: "operate", display: true, key: "operate", - title: "操作" + title: getLabel(111, "操作") }], item => { const { dataIndex } = item; if (dataIndex === "useDefault") { @@ -70,10 +72,10 @@ class FieldTable extends Component { item.render = (text, record) => { return ; }; @@ -90,7 +92,7 @@ class FieldTable extends Component { const { dataSource, pageInfo, loading } = this.state; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/index.js b/pc4mobx/hrmSalary/pages/fieldManagement/index.js index 0e6564d9..17c9c9df 100644 --- a/pc4mobx/hrmSalary/pages/fieldManagement/index.js +++ b/pc4mobx/hrmSalary/pages/fieldManagement/index.js @@ -7,12 +7,13 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, message, Modal } from "antd"; -import { WeaInputSearch, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaTop, WeaLocaleProvider } from "ecCom"; import FieldTable from "./components/fieldTable"; import FieldSlide from "./components/fieldSlide"; import { deleteSalaryField } from "../../apis/fieldManage"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer class FieldManagement extends Component { @@ -23,7 +24,7 @@ class FieldManagement extends Component { doSearch: false, slideparams: { visible: false, - title: "新建字段", + title: getLabel(111, "新建字段"), record: {} } }; @@ -35,22 +36,22 @@ class FieldManagement extends Component { slideparams: { ...slideparams, visible: true, - title: "编辑字段", + title: getLabel(111, "编辑字段"), record: _.pick(record, ["id"]) } }); }; handleDeleteField = (filedIds) => { Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { deleteSalaryField(filedIds).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.setState({ doSearch: !this.state.doSearch }); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -62,7 +63,7 @@ class FieldManagement extends Component { slideparams: { ...slideparams, visible: false, - title: "新建字段", + title: getLabel(111, "新建字段"), record: {} } }); @@ -76,16 +77,16 @@ class FieldManagement extends Component { , + >{getLabel(111, "新建")}, this.setState({ searchVal })} onSearch={() => this.setState({ doSearch: !doSearch })} /> ]; return ( } iconBgcolor="#F14A2D" showDropIcon={false} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/LedgerBackCalculatedSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/LedgerBackCalculatedSalaryItemTable.js index 3788b5f9..4d24f016 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/LedgerBackCalculatedSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/LedgerBackCalculatedSalaryItemTable.js @@ -5,10 +5,12 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import LedgerBackCalcEditSlide from "./ledgerBackCalcEditSlide"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class LedgerBackCalculatedSalaryItemTable extends Component { @@ -17,7 +19,7 @@ class LedgerBackCalculatedSalaryItemTable extends Component { this.state = { backCalcEditSlide: { visible: false, - title: "编辑薪资项目", + title: getLabel(111, "编辑薪资项目"), id: "", salaryItemId: "", backCalcType: "" @@ -60,26 +62,26 @@ class LedgerBackCalculatedSalaryItemTable extends Component { const columns = [ { dataIndex: "name", - title: "薪资项目", + title: getLabel(111, "薪资项目"), render: (text) => { return {text}; } }, { dataIndex: "formulaContent", - title: "核算公式", + title: getLabel(111, "核算公式"), render: (text, record) => { return {text}; } }, { dataIndex: "", - title: "操作", + title: getLabel(111, "操作"), width: 80, render: (text, record, index) => { const { canEdit } = record; return (showOperateBtn && canEdit) ? - this.handleEditBackCalc(record)}>编辑 : + this.handleEditBackCalc(record)}>{getLabel(111, "编辑")} : ; } } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/categoryAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/categoryAddModal.js index 2aef96cb..4b32a152 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/categoryAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/categoryAddModal.js @@ -7,10 +7,11 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { categoryConditions } from "../config"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { Button } from "antd"; import { getSearchs } from "../../../util"; +const getLabel = WeaLocaleProvider.getLabel; @inject("ledgerStore") @observer class CategoryAddModal extends Component { @@ -60,8 +61,8 @@ class CategoryAddModal extends Component { const { loading } = this.state; const { categoryForm: form } = ledgerStore; const buttons = [ - , - + , + ]; return ( { this.setState({ loading: false }); if (status) { - message.success(errormsg || "复制成功"); + message.success(errormsg || getLabel(111, "复制成功")); onRefreshList(); onCancel(); } else { - message.error(errormsg || "复制失败"); + message.error(errormsg || getLabel(111, "复制失败")); } }); } else { @@ -90,8 +92,8 @@ class CopyLedgerModal extends Component { const { loading } = this.state; const { copyForm: form } = ledgerStore; const buttons = [ - , - + , + ]; return ( 保存]; + const buttons = []; return ( - } labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
    - 如果:调薪生效日期在 + {getLabel(111, "如果:调薪生效日期在")} this.setState({ dayOfMonth })} /> - (含)之前 + {getLabel(111, "(含)之前")}
    - 计薪规则为: + {getLabel(111, "计薪规则为:")} this.setState({ beforeAdjustmentType: e.target.value })} value={beforeAdjustmentType}> - 取调整后薪资 - 分段计薪{getLabel(111, "取调整后薪资")} + {getLabel(111, "分段计薪")} - 取平均{getLabel(111, "取平均")}
    -
    否则:调薪生效日期在{dayOfMonth}号之后
    +
    {getLabel(111, "否则:调薪生效日期在")}{dayOfMonth}{getLabel(111, "号之后")}
    - 计薪规则为: + {getLabel(111, "计薪规则为:")} this.setState({ afterAdjustmentType: e.target.value })} value={afterAdjustmentType}> - 取调整前薪资 - 分段计薪{getLabel(111, "取调整前薪资")} + {getLabel(111, "分段计薪")} - 取平均{getLabel(111, "取平均")} @@ -178,10 +180,10 @@ export default LedgerAdjustRuleAddModal; const AdjustTitle = () => { return
    - 计薪规则 + {getLabel(111, "计薪规则")} : diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index d3660ebe..63002c2e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, message, Modal } from "antd"; -import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom"; +import { WeaButtonIcon, WeaInputSearch, WeaLocaleProvider, WeaTab } from "ecCom"; import PersonalScopeTable from "../../../components/PersonalScopeTable"; import PersonalScopeModal from "../../../components/PersonalScopeModal"; import { @@ -29,6 +29,8 @@ const APISaveFox = { save: saveLedgerPersonRange }; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class LedgerAssociatedPersonnel extends Component { @@ -46,7 +48,7 @@ class LedgerAssociatedPersonnel extends Component { }, personalAddModal: { visible: false, - title: "关联人员", + title: getLabel(111, "关联人员"), includeType: "" } }; @@ -60,17 +62,17 @@ class LedgerAssociatedPersonnel extends Component { */ taxAgentRangeDelete = () => { Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.setState({ rowKeys: [] }, () => { this.personalScopeTableRef.clearRowkeys(); }); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -143,11 +145,11 @@ class LedgerAssociatedPersonnel extends Component { const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props; const topTab = [ { - title: "关联人员范围", + title: getLabel(111, "关联人员范围"), viewcondition: "listInclude" }, { - title: "从范围中排除", + title: getLabel(111, "从范围中排除"), viewcondition: "listExclude" } ]; @@ -164,7 +166,7 @@ class LedgerAssociatedPersonnel extends Component { importResult: {} } })} - >, + >, this.setState({ searchValue })} - placeholder="请输入对象" + placeholder={getLabel(111, "请输入对象")} onSearch={() => this.personalScopeTableRef.getPersonalScopeList()} /> ] : [ this.setState({ searchValue })} - placeholder="请输入对象" + placeholder={getLabel(111, "请输入对象")} onSearch={() => this.personalScopeTableRef.getPersonalScopeList()} />]; return ( diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalcEditSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalcEditSlide.js index b427977f..c7af4e19 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalcEditSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalcEditSlide.js @@ -5,7 +5,7 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; -import { WeaFormItem, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea } from "ecCom"; +import { WeaFormItem, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaLocaleProvider } from "ecCom"; import { Col, message, Modal, Row } from "antd"; import SlideModalTitle from "../../../components/slideModalTitle"; import { getBackitemForm, salarysobBackitemSave } from "../../../apis/ledger"; @@ -13,6 +13,7 @@ import { fieldType, keepDecimalPlaces, roundingRules, valueTaking } from "../con import FormalFormModal from "../../salaryItem/formalFormModal"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; class LedgerBackCalcEditSlide extends Component { constructor(props) { super(props); @@ -57,8 +58,8 @@ class LedgerBackCalcEditSlide extends Component { const { salaryItemId, editId: salarySobId, onCancle } = this.props; if (extra.valueType === "FORMULA" && _.isEmpty(extra.formulaContent)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -67,10 +68,10 @@ class LedgerBackCalcEditSlide extends Component { salarysobBackitemSave(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); onCancle(true); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -138,15 +139,15 @@ class LedgerBackCalcEditSlide extends Component {
    - + - + - + this.handleChange("roundingMode", v)} @@ -154,7 +155,7 @@ class LedgerBackCalcEditSlide extends Component { - + this.handleChange("pattern", v)} @@ -162,7 +163,7 @@ class LedgerBackCalcEditSlide extends Component { - + { valueType === "FORMULA" && - +
    diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalculatedSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalculatedSalaryItem.js index 80764a70..71fe7760 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalculatedSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBackCalculatedSalaryItem.js @@ -5,11 +5,13 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; -import { WeaHelpfulTip, WeaSearchGroup } from "ecCom"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import LedgerBackCalculatedSalaryItemTable from "./LedgerBackCalculatedSalaryItemTable"; import { getAggregate } from "../../../apis/ledger"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class LedgerBackCalculatedSalaryItem extends Component { constructor(props) { super(props); @@ -17,20 +19,20 @@ class LedgerBackCalculatedSalaryItem extends Component { backCalcItems: [ { key: "issuedItems", - label: "已发项目设置", + label: getLabel(111, "已发项目设置"), dataSource: [], helpContent: [ - "核算时,已发项目的公式中各项目值均取该项目在该账套核算中的最后一次核算值;", - "已发项目的公式设置,只可在【取最后一次核算值的项目】中选择;" + getLabel(111, "核算时,已发项目的公式中各项目值均取该项目在该账套核算中的最后一次核算值;"), + getLabel(111, "已发项目的公式设置,只可在【取最后一次核算值的项目】中选择;") ] }, { key: "reissueItems", - label: "补发项目设置", + label: getLabel(111, "补发项目设置"), dataSource: [], helpContent: [ - "系统内置补发项目【补发薪资合计】,可新增其他的项目,如【补发备注】等;", - "公式取值为当次回算的核算值。" + getLabel(111, "系统内置补发项目【补发薪资合计】,可新增其他的项目,如【补发备注】等;"), + getLabel(111, "公式取值为当次回算的核算值。") ] } ] diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js index cfe0f90b..437320b5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js @@ -5,10 +5,9 @@ * Date: 2022/12/9 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom"; import { Col, Row } from "antd"; import { inject, observer } from "mobx-react"; -import {toJS} from 'mobx'; import { baseSettingFormItem } from "../config"; import { getLedgerBasicForm } from "../../../apis/ledger"; import { getAddMonthYearMonth, getCurrentYearMonth, getSubtractMonthYearMonth } from "../../../util/date"; @@ -16,6 +15,8 @@ import { commonEnumList } from "../../../apis/ruleconfig"; import moment from "moment"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class LedgerBaseSetting extends Component { @@ -178,8 +179,9 @@ class LedgerBaseSetting extends Component { type === "CHECKBOX" ? - + content={getLabel(111, "【入职日期≤薪资周期止】且【离职日期≥薪资周期起】")}/> + : type === "SELECT" ? { const salaryCycleStrObj = initPeriodStr("salaryCycleStr", salaryCycleType, salaryCycleFromDay); const attendCycleStrObj = initPeriodStr("attendCycleStr", attendCycleType, attendCycleFromDay); return
    -
    月份周期说明
    +
    {getLabel(111, "月份周期说明")}
    - 例:薪资所属月是{moment().format("YYYY-MM")}(即核算员工{moment().format("MM")}月的工资) + {getLabel(111, "例:薪资所属月是")}{moment().format("YYYY-MM")}({getLabel(111, "即核算员工")}{moment().format("MM")}{getLabel(111, "月的工资")})
    -
    根据您当前的选择,相应的周期为:
    -
    薪资周期
    +
    {getLabel(111, "根据您当前的选择,相应的周期为:")}
    +
    {getLabel(111, "薪资周期")}
    - {getStartDate(salaryCycleType, salaryCycleFromDay)}至 + {getStartDate(salaryCycleType, salaryCycleFromDay)}{getLabel(111, "至")} {salaryCycleStrObj.date}
    -
    税款所属期
    +
    {getLabel(111, "税款所属期")}
    {getMonth(taxCycleType)}
    -
    考勤取值周期
    +
    {getLabel(111, "考勤取值周期")}
    - {getStartDate(attendCycleType, attendCycleFromDay)}至 + {getStartDate(attendCycleType, attendCycleFromDay)}{getLabel(111, "至")} {attendCycleStrObj.date}
    -
    福利台账月份
    -
    引用{getMonth(socialSecurityCycleType)}的福利台账数据
    +
    {getLabel(111, "福利台账月份")}
    +
    {getLabel(111, "引用")}{getMonth(socialSecurityCycleType)}{getLabel(111, "的福利台账数据")}
    ; }; @@ -287,11 +291,11 @@ const initPeriodStr = (periodStrType, types, fromDay) => { const is_31H = moment(tmpDate, "YYYY-MM").daysInMonth() === 31; if (fromDay == 1) { tmpDate = moment().subtract(2, "month").endOf("month"); - str = `至上上月最后一天`; + str = getLabel(111, "至上上月最后一天"); } else { tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`)) .add(is_31H ? 30 : 27, "days"); - str = `至上月${moment(tmpDate).date()}号`; + str = `${getLabel(111, "至上月")}${moment(tmpDate).date()}${getLabel(111, "号")}`; } break; case "2": @@ -299,11 +303,11 @@ const initPeriodStr = (periodStrType, types, fromDay) => { const is_31 = moment(tmpDate, "YYYY-MM").daysInMonth() === 31; if (fromDay == 1) { tmpDate = moment().subtract(1, "month").endOf("month"); - str = `至上月最后一天`; + str = getLabel(111, "至上月最后一天"); } else { tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`)) .add(is_31 ? 30 : 27, "days"); - str = `至本月${moment(tmpDate).date()}号`; + str = `${getLabel(111, "至本月")}${moment(tmpDate).date()}${getLabel(111, "号")}`; } break; case "3": @@ -311,11 +315,11 @@ const initPeriodStr = (periodStrType, types, fromDay) => { const is_31K = moment(tmpDate, "YYYY-MM").daysInMonth() === 31; if (fromDay == 1) { tmpDate = moment().endOf("month"); - str = `至本月最后一天`; + str = getLabel(111, "至本月最后一天"); } else { tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`)) .add(is_31K ? 30 : 27, "days"); - str = `至下月${moment(tmpDate).date()}号`; + str = `${getLabel(111, "至下月")}${moment(tmpDate).date()}${getLabel(111, "号")}`; } break; case "4": @@ -323,11 +327,11 @@ const initPeriodStr = (periodStrType, types, fromDay) => { const is_31L = moment(tmpDate, "YYYY-MM").daysInMonth() === 31; if (fromDay == 1) { tmpDate = moment().add(1, "month").endOf("month"); - str = `至下月最后一天`; + str = getLabel(111, "至下月最后一天"); } else { tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`)) .add(is_31L ? 30 : 29, "days"); - str = `至下下月${moment(tmpDate).date()}号`; + str = `${getLabel(111, "至下下月")}${moment(tmpDate).date()}${getLabel(111, "号")}`; } break; default: diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js index e0b20c93..445143b3 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js @@ -5,16 +5,18 @@ * Date: 2023/3/8 */ import React, { Component } from "react"; -import { WeaDialog, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; import { Button } from "antd"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class LedgerMovoTo extends Component { render() { const { dataList, value, onChangeMoveVal, onSubmitMoveTo, ...extraProps } = this.props; const buttons = [ - , - + , + ]; return ( { const { dataSource } = this.state; Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { this.setState({ dataSource: _.filter(dataSource, (it, idx) => idx !== index) @@ -83,10 +85,10 @@ class LedgerSalaryAdjustmentRules extends Component { }; convertAdjustmentType = (index) => { const nameList = { - 1: "取调薪前薪资", - 2: "取调薪后薪资", - 3: "平均值", - 4: "分段计薪" + 1: getLabel(111, "取调薪前薪资"), + 2: getLabel(111, "取调薪后薪资"), + 3: getLabel(111, "平均值"), + 4: getLabel(111, "分段计薪") }; return nameList[Number(index)]; }; @@ -101,26 +103,26 @@ class LedgerSalaryAdjustmentRules extends Component { const columns = [ { dataIndex: "salaryItemName", - title: "薪资项目", + title: getLabel(111, "薪资项目"), render: (text) => { return {text}; } }, { dataIndex: "salaryCalculationRules", - title: "计薪规则", + title: getLabel(111, "计薪规则"), render: (text, record) => { - const salaryCalculationRules = `${record.dayOfMonth}号(含)之前调薪,${this.convertAdjustmentType(record.beforeAdjustmentType)};${record.dayOfMonth}号之后调薪,${this.convertAdjustmentType(record.afterAdjustmentType)}`; + const salaryCalculationRules = `${record.dayOfMonth}${getLabel(111, "号(含)之前调薪,")}${this.convertAdjustmentType(record.beforeAdjustmentType)};${record.dayOfMonth}${getLabel(111, "号之后调薪,")}${this.convertAdjustmentType(record.afterAdjustmentType)}`; return {salaryCalculationRules}; } }, { dataIndex: "", - title: "操作", + title: getLabel(111, "操作"), width: 80, render: (text, record, index) => { return showOperateBtn ? - this.handleDelete(index)}>删除 : ; + this.handleDelete(index)}>{getLabel(111, "删除")} : ; } } ]; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js index abcf4aa1..e356002e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js @@ -5,12 +5,15 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; import LedgerSalaryItemBaseInfo from "./ledgerSalaryItemBaseInfo"; import LedgerSalaryItemNormal from "./ledgerSalaryItemNormal"; import LedgerSalaryItemPreviewModal from "./ledgerSalaryItemPreviewModal"; import { getLedgerItemForm } from "../../../apis/ledger"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class LedgerSalaryItem extends Component { constructor(props) { super(props); @@ -41,7 +44,7 @@ class LedgerSalaryItem extends Component { uuid: itemGroups.length.toString(), itemHide: null, items, - name: "未分类", + name: getLabel(111, "未分类"), salarySobId, sortedIndex: itemGroups.length }; @@ -304,7 +307,7 @@ class LedgerSalaryItem extends Component { handleMoveSalaryItem = (moveToItemId, items, titleName) => { const { itemGroups } = this.state; const { salaryItemGroupId: deleteItemId, id, key } = items; - if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return; + if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === getLabel(111, "未分类"))) return; this.setState({ itemGroups: _.map(itemGroups, it => { if (moveToItemId === it.uuid) { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index 20562453..b562a2bb 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -1,8 +1,9 @@ import React from "react"; import { Button, Switch } from "antd"; -import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom"; +import { WeaDialog, WeaInputSearch, WeaTable, WeaLocaleProvider } from "ecCom"; import { listSalaryItem } from "../../../apis/ledger"; +const getLabel = WeaLocaleProvider.getLabel; export default class LedgerSalaryItemAddModal extends React.Component { constructor(props) { super(props); @@ -104,7 +105,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, pageSizeOptions: ["10", "20", "50", "100"], onChange: current => { @@ -125,12 +126,12 @@ export default class LedgerSalaryItemAddModal extends React.Component { return ( 添加]} + title={getLabel(111, "添加薪资项目")} style={{ width: "80vw", height: 400 }} + buttons={[]} >
    this.setState({ name })} onSearch={() => this.listSalaryItem()} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js index 6961ded8..dc426563 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js @@ -5,10 +5,11 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; -import { WeaHelpfulTip, WeaSearchGroup, WeaSelect, WeaSortable } from "ecCom"; +import { WeaHelpfulTip, WeaSearchGroup, WeaSelect, WeaSortable, WeaLocaleProvider } from "ecCom"; import { Button, Icon } from "antd"; import { empFieldList } from "../../../apis/ledger"; +const getLabel = WeaLocaleProvider.getLabel; class LedgerSalaryItemBaseInfo extends Component { constructor(props) { super(props); @@ -92,13 +93,13 @@ const TitleComp = (props) => { const { onPreview } = props; return
    - 员工基本信息 + {getLabel(111, "员工基本信息")}
    - +
    ; }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index f6e4e295..7f84c4d7 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaButtonIcon, WeaSearchGroup } from "ecCom"; +import { WeaButtonIcon, WeaSearchGroup, WeaLocaleProvider } from "ecCom"; import { Button, Modal } from "antd"; import CategoryAddModal from "./categoryAddModal"; import LedgerSalaryItemAddModal from "./ledgerSalaryItemAddModal"; @@ -15,6 +15,7 @@ import FormalFormModal from "../../salaryItem/formalFormModal"; import LedgerMovoTo from "./ledgerMovoTo"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("ledgerStore") @observer class LedgerSalaryItemNormal extends Component { @@ -24,7 +25,7 @@ class LedgerSalaryItemNormal extends Component { addCategoryItemsVisible: false, categoryModal: { visible: false, - title: "新增分类", + title: getLabel(111, "新增分类"), name: "", id: "" }, @@ -80,7 +81,7 @@ class LedgerSalaryItemNormal extends Component { ...categoryModal, visible: true, name, - title: name ? "编辑分类" : "新增分类", + title: name ? getLabel(111, "编辑分类") : getLabel(111, "新增分类"), id } }); @@ -88,8 +89,8 @@ class LedgerSalaryItemNormal extends Component { handleDeleteCategory = (id) => { const { onDeleteCategroy } = this.props; Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { onDeleteCategroy(id); } @@ -98,8 +99,8 @@ class LedgerSalaryItemNormal extends Component { handleDeleteCategoryItems = (id, selectedRowKeys) => { const { onDeleteCategroyItems } = this.props; Modal.confirm({ - title: "信息确认", - content: "确认删除所选薪资项目吗?删除后此项目下的进位规则/保留小数位/公式内容会一起被清除!", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除所选薪资项目吗?删除后此项目下的进位规则/保留小数位/公式内容会一起被清除!"), onOk: () => { onDeleteCategroyItems(id, selectedRowKeys); } @@ -121,7 +122,7 @@ class LedgerSalaryItemNormal extends Component { categoryModal: { ...categoryModal, visible: false, - title: "新增分类", + title: getLabel(111, "新增分类"), name: "", id: "" } @@ -167,8 +168,8 @@ class LedgerSalaryItemNormal extends Component { this.setState({ moveModalPayload: { visible: true, - title: "移动到", - value: salaryItemGroupId !== "0" ? salaryItemGroupId : (_.find(dataSource, it => it.name === "未分类").id || _.find(dataSource, it => it.name === "未分类").uuid), + title: getLabel(111, "移动到"), + value: salaryItemGroupId !== "0" ? salaryItemGroupId : (_.find(dataSource, it => it.name === getLabel(111, "未分类")).id || _.find(dataSource, it => it.name === getLabel(111, "未分类")).uuid), record, dataList: _.map(dataSource, item => ({ key: item.id || item.uuid, showname: item.name })) } @@ -275,20 +276,20 @@ const TitleNormalComp = (props) => {
    {name} { - name !== "未分类" && showOperateBtn && - onEditCategory(name, uuid)}/> + name !== getLabel(111, "未分类") && showOperateBtn && + onEditCategory(name, uuid)}/> } { - name !== "未分类" && _.isEmpty(items) && showOperateBtn && - onDeleteCategory(uuid)}/> + name !== getLabel(111, "未分类") && _.isEmpty(items) && showOperateBtn && + onDeleteCategory(uuid)}/> } { sortedIndex !== 0 && showOperateBtn && - onUpgo(sortedIndex)}/> + onUpgo(sortedIndex)}/> } { sortedIndex !== dataSourceLen - 1 && showOperateBtn && - onDowngo(sortedIndex)}/> + onDowngo(sortedIndex)}/> }
    @@ -309,7 +310,7 @@ const TitleComp = (props) => { {titleName} { showOperateBtn && - + }
    ; }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js index b9c0243d..69262de5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js @@ -1,6 +1,7 @@ import React from "react"; -import { WeaDialog, WeaTable } from "ecCom"; +import { WeaDialog, WeaTable, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export default class LedgerSalaryItemPreviewModal extends React.Component { getColumns = () => { const { empFields, itemGroups } = this.props; @@ -33,7 +34,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component { return ( diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index 925e04e7..eff014b5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -5,8 +5,9 @@ * Date: 2022/12/13 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaHelpfulTip, WeaTable } from "ecCom"; +import { WeaCheckbox, WeaHelpfulTip, WeaTable, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; class LedgerSalaryItemTable extends Component { constructor(props) { super(props); @@ -68,13 +69,13 @@ class LedgerSalaryItemTable extends Component { const checkValue = (!_.isEmpty(dataSource) && _.every(dataSource, it => it.itemHide && it.itemHide === "1")) ? "1" : "0"; const columns = [ { - title: "名称", + title: getLabel(111, "名称"), dataIndex: "name", key: "name" }, { title: - 核算公式 + {getLabel(111, "核算公式")} } placement="bottom" width={200}/> , dataIndex: "formulaContent", @@ -92,7 +93,7 @@ class LedgerSalaryItemTable extends Component { } }, { - title: "个税申请表对应字段", + title: getLabel(111, "个税申请表对应字段"), dataIndex: "taxDeclarationColumn", key: "taxDeclarationColumn" }, @@ -102,7 +103,7 @@ class LedgerSalaryItemTable extends Component { value={checkValue} onChange={value => this.handleChangeAllItem(value)} /> - 隐藏 + {getLabel(111, "隐藏")} , dataIndex: "itemHide", key: "itemHide", @@ -113,12 +114,12 @@ class LedgerSalaryItemTable extends Component { /> }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "operate", key: "operate", width: 100, render: (_, record) => ( - onMoveTo(record)}>移动到 + onMoveTo(record)}>{getLabel(111, "移动到")} ) } ]; @@ -144,8 +145,8 @@ export default LedgerSalaryItemTable; const HelpContent = () => { return - 1、新建薪资账套时,核算公式与【薪资项目管理】菜单一致;
    - 2、取值方式为公式的薪资项目,核算公式显示为具体公式;点击公式可编辑公式,核算时,按照当前薪资项目的公式进行核算;
    - 3、薪资账套内的薪资项目的公式或SQL的修改或公式的修改,都不影响【薪资项目管理】菜单的薪资项目取值方式或公式,只对当前账套生效;
    + {getLabel(111, "1、新建薪资账套时,核算公式与【薪资项目管理】菜单一致;")}
    + {getLabel(111, "2、取值方式为公式的薪资项目,核算公式显示为具体公式;点击公式可编辑公式,核算时,按照当前薪资项目的公式进行核算;")}
    + {getLabel(111, "3、薪资账套内的薪资项目的公式或SQL的修改或公式的修改,都不影响【薪资项目管理】菜单的薪资项目取值方式或公式,只对当前账套生效;")}
    ; }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 48fe3eda..ecd5784a 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSlideModal, WeaSteps } from "ecCom"; +import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom"; import { Button, message, Modal } from "antd"; import SlideModalTitle from "../../../components/slideModalTitle"; import LedgerBaseSetting from "./ledgerBaseSetting"; @@ -17,13 +17,14 @@ import LedgerSalaryItem from "./ledgerSalaryItem"; import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; const Step = WeaSteps.Step; const tabs = [ - { key: 0, title: "基础设置" }, - { key: 1, title: "关联人员" }, - { key: 2, title: "薪资项目" }, - { key: 3, title: "回算薪资项目" }, - { key: 4, title: "调薪计薪规则" } + { key: 0, title: getLabel(111, "基础设置") }, + { key: 1, title: getLabel(111, "关联人员") }, + { key: 2, title: getLabel(111, "薪资项目") }, + { key: 3, title: getLabel(111, "回算薪资项目") }, + { key: 4, title: getLabel(111, "调薪计薪规则") } ]; @inject("taxAgentStore") @@ -60,8 +61,8 @@ class LedgerSlide extends Component { const bool = _.every(Object.keys(extra), key => !!extra[key]); if (!bool || _.isEmpty(baseSettingInfo)) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return false; } @@ -70,11 +71,11 @@ class LedgerSlide extends Component { this.setState({ loading: false }); if (status) { const { onRefreshList } = this.props; - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); onRefreshList(); !editId && this.setState({ current: current + 1, saveSalarySobId: data }); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -94,10 +95,10 @@ class LedgerSlide extends Component { saveAdjustmentRule(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); this.handleClose(); } else { - message.success(errormsg || "保存失败"); + message.success(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -115,7 +116,7 @@ class LedgerSlide extends Component { if (Object.prototype.toString.call(it.id) === "[object Number]") delete it.id; return { ...it }; }), - itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => { + itemGroups: _.map(_.filter(itemGroups, it => it.name !== getLabel(111, "未分类")), item => { return { ...item, items: _.map(item.items, it => { @@ -125,7 +126,7 @@ class LedgerSlide extends Component { }) }; }), - items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => { + items: _.map(_.find(itemGroups, it => it.name === getLabel(111, "未分类")).items, child => { // if (child.id && child.id.length > 4) delete child.id; // delete child.formulaContent; return { ...child }; @@ -136,9 +137,9 @@ class LedgerSlide extends Component { saveLedgerItem(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -207,20 +208,20 @@ class LedgerSlide extends Component { type="primary" loading={loading} onClick={this.saveLedgerBasic} - >{editId ? "保存" : "保存并进入下一步"} + >{editId ? getLabel(111, "保存") : getLabel(111, "保存并进入下一步")} ]; break; case 1: CurrentDom = !editId ? [ - , - + , + ] : []; break; case 2: CurrentDom = !editId ? [ - , - , + , + , + >{getLabel(111, "保存并进入下一步")} ] : [ - + ]; break; case 3: CurrentDom = !editId ? [ - , - , - + , + , + ] : []; break; case 4: CurrentDom = !editId ? [ - , - + , + ] : [ - + ]; break; default: diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js index 97fa0829..9d4ce33c 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerTable.js @@ -5,13 +5,15 @@ * Date: 2022/12/7 */ import React, { Component } from "react"; -import { WeaCheckbox, WeaTable } from "ecCom"; +import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import { Menu, message, Modal, Popover } from "antd"; import { changeLedgerStatus, deleteLedger, getLedgerList } from "../../../apis/ledger"; import CopyLedgerModal from "./copyLedgerModal"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class LedgerTable extends Component { @@ -28,7 +30,7 @@ class LedgerTable extends Component { }, copyLedgerModal: { visible: false, - title: "复制账套", id: "", name: "", taxAgenyId: "" + title: getLabel(111, "复制账套"), id: "", name: "", taxAgenyId: "" } }; } @@ -38,10 +40,10 @@ class LedgerTable extends Component { } componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1}); + if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({ current: 1 }); } - getLedgerList = (extra={}) => { + getLedgerList = (extra = {}) => { const { name } = this.props; const { pageInfo } = this.state; const payload = { name, ...pageInfo, ...extra }; @@ -77,15 +79,16 @@ class LedgerTable extends Component { item.width = 120; item.render = (text, record) => { return
    - onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"} + onEditLedger(record)}>{showOperateBtn ? getLabel(111, "编辑") : getLabel(111, "查看")} { showOperateBtn && this.handleMenuClick(e, record)}> - 复制 - 删除 + {getLabel(111, "复制")} + {getLabel(111, "删除")} } title=""> @@ -109,10 +112,10 @@ class LedgerTable extends Component { deleteLedger = (payload) => { deleteLedger(payload).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); this.getLedgerList(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); }; @@ -125,10 +128,10 @@ class LedgerTable extends Component { changeLedgerStatus = (payload) => { changeLedgerStatus(payload).then(({ status, errormsg }) => { if (status) { - message.success("操作成功"); + message.success(getLabel(111, "操作成功")); this.getLedgerList(); } else { - message.error(errormsg || "操作成功"); + message.error(errormsg || getLabel(111, "操作失败")); } }); }; @@ -149,8 +152,8 @@ class LedgerTable extends Component { break; case "delete": Modal.confirm({ - title: "信息确认", - content: "确认要删除吗?", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { this.deleteLedger([id]); } @@ -165,7 +168,7 @@ class LedgerTable extends Component { const { dataSource, columns, pageInfo, loading, copyLedgerModal } = this.state; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/config.js b/pc4mobx/hrmSalary/pages/ledgerPage/config.js index 1a9f3717..8df50c9d 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/config.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/config.js @@ -1,3 +1,6 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const copyConditions = [ { items: [ @@ -7,7 +10,7 @@ export const copyConditions = [ domkey: ["name"], fieldcol: 14, rules: "required|string", - label: "账套名称", + label: getLabel(111, "账套名称"), labelcol: 6, value: "", viewAttr: 3 @@ -18,7 +21,7 @@ export const copyConditions = [ domkey: ["taxAgentId"], fieldcol: 14, rules: "required|string", - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), labelcol: 6, value: "", viewAttr: 3 @@ -36,7 +39,7 @@ export const categoryConditions = [ domkey: ["name"], fieldcol: 14, rules: "required|string", - label: "名称", + label: getLabel(111, "名称"), labelcol: 6, value: "", viewAttr: 3 @@ -48,18 +51,18 @@ export const categoryConditions = [ export const baseSettingFormItem = [ { key: "name", - label: "账套名称", + label: getLabel(111, "账套名称"), type: "INPUT" }, { key: "taxAgentId", - label: "个税扣缴义务人", + label: getLabel(111, "个税扣缴义务人"), type: "SELECT", options: [] }, { key: "taxableItems", - label: "薪资类型", + label: getLabel(111, "薪资类型"), type: "SELECT", options: [ // { @@ -76,7 +79,7 @@ export const baseSettingFormItem = [ }, { key: "salaryCycleStrObj", - label: "薪资周期", + label: getLabel(111, "薪资周期"), type: "CUSTOM", children: [ { @@ -86,22 +89,22 @@ export const baseSettingFormItem = [ { key: "1", selected: false, - showname: "上上月" + showname: getLabel(111, "上上月") }, { key: "2", selected: false, - showname: "上月" + showname: getLabel(111, "上月") }, { key: "3", selected: true, - showname: "本月" + showname: getLabel(111, "本月") }, { key: "4", selected: false, - showname: "下月" + showname: getLabel(111, "下月") } ] }, @@ -112,157 +115,157 @@ export const baseSettingFormItem = [ { key: "1", selected: true, - showname: "1号" + showname: getLabel(111, "1号") }, { key: "2", selected: false, - showname: "2号" + showname: getLabel(111, "2号") }, { key: "3", selected: false, - showname: "3号" + showname: getLabel(111, "3号") }, { key: "4", selected: false, - showname: "4号" + showname: getLabel(111, "4号") }, { key: "5", selected: false, - showname: "5号" + showname: getLabel(111, "5号") }, { key: "6", selected: false, - showname: "6号" + showname: getLabel(111, "6号") }, { key: "7", selected: false, - showname: "7号" + showname: getLabel(111, "7号") }, { key: "8", selected: false, - showname: "8号" + showname: getLabel(111, "8号") }, { key: "9", selected: false, - showname: "9号" + showname: getLabel(111, "9号") }, { key: "10", selected: false, - showname: "10号" + showname: getLabel(111, "10号") }, { key: "11", selected: false, - showname: "11号" + showname: getLabel(111, "11号") }, { key: "12", selected: false, - showname: "12号" + showname: getLabel(111, "12号") }, { key: "13", selected: false, - showname: "13号" + showname: getLabel(111, "13号") }, { key: "14", selected: false, - showname: "14号" + showname: getLabel(111, "14号") }, { key: "15", selected: false, - showname: "15号" + showname: getLabel(111, "15号") }, { key: "16", selected: false, - showname: "16号" + showname: getLabel(111, "16号") }, { key: "17", selected: false, - showname: "17号" + showname: getLabel(111, "17号") }, { key: "18", selected: false, - showname: "18号" + showname: getLabel(111, "18号") }, { key: "19", selected: false, - showname: "19号" + showname: getLabel(111, "19号") }, { key: "20", selected: false, - showname: "20号" + showname: getLabel(111, "20号") }, { key: "21", selected: false, - showname: "21号" + showname: getLabel(111, "21号") }, { key: "22", selected: false, - showname: "22号" + showname: getLabel(111, "22号") }, { key: "23", selected: false, - showname: "23号" + showname: getLabel(111, "23号") }, { key: "24", selected: false, - showname: "24号" + showname: getLabel(111, "24号") }, { key: "25", selected: false, - showname: "25号" + showname: getLabel(111, "25号") }, { key: "26", selected: false, - showname: "26号" + showname: getLabel(111, "26号") }, { key: "27", selected: false, - showname: "27号" + showname: getLabel(111, "27号") }, { key: "28", selected: false, - showname: "28号" + showname: getLabel(111, "28号") }, { key: "29", selected: false, - showname: "29号" + showname: getLabel(111, "29号") }, { key: "30", selected: false, - showname: "30号" + showname: getLabel(111, "30号") }, { key: "31", selected: false, - showname: "31号" + showname: getLabel(111, "31号") } ] } @@ -270,34 +273,34 @@ export const baseSettingFormItem = [ }, { key: "taxCycleType", - label: "税款所属期", + label: getLabel(111, "税款所属期"), type: "SELECT", options: [ { key: "1", selected: false, - showname: "上上月" + showname: getLabel(111, "上上月"), }, { key: "2", selected: false, - showname: "上月" + showname: getLabel(111, "上月"), }, { key: "3", selected: true, - showname: "本月" + showname: getLabel(111, "本月") }, { key: "4", selected: false, - showname: "下月" + showname: getLabel(111, "下月") } ] }, { key: "attendCycleStrObj", - label: "考勤周期", + label: getLabel(111, "考勤周期"), type: "CUSTOM", children: [ { @@ -307,22 +310,22 @@ export const baseSettingFormItem = [ { key: "1", selected: false, - showname: "上上月" + showname: getLabel(111, "上上月") }, { key: "2", selected: false, - showname: "上月" + showname: getLabel(111, "上月") }, { key: "3", selected: true, - showname: "本月" + showname: getLabel(111, "本月") }, { key: "4", selected: false, - showname: "下月" + showname: getLabel(111, "下月") } ] }, @@ -333,157 +336,157 @@ export const baseSettingFormItem = [ { key: "1", selected: true, - showname: "1号" + showname: getLabel(111, "1号") }, { key: "2", selected: false, - showname: "2号" + showname: getLabel(111, "2号") }, { key: "3", selected: false, - showname: "3号" + showname: getLabel(111, "3号") }, { key: "4", selected: false, - showname: "4号" + showname: getLabel(111, "4号") }, { key: "5", selected: false, - showname: "5号" + showname: getLabel(111, "5号") }, { key: "6", selected: false, - showname: "6号" + showname: getLabel(111, "6号") }, { key: "7", selected: false, - showname: "7号" + showname: getLabel(111, "7号") }, { key: "8", selected: false, - showname: "8号" + showname: getLabel(111, "8号") }, { key: "9", selected: false, - showname: "9号" + showname: getLabel(111, "9号") }, { key: "10", selected: false, - showname: "10号" + showname: getLabel(111, "10号") }, { key: "11", selected: false, - showname: "11号" + showname: getLabel(111, "11号") }, { key: "12", selected: false, - showname: "12号" + showname: getLabel(111, "12号") }, { key: "13", selected: false, - showname: "13号" + showname: getLabel(111, "13号") }, { key: "14", selected: false, - showname: "14号" + showname: getLabel(111, "14号") }, { key: "15", selected: false, - showname: "15号" + showname: getLabel(111, "15号") }, { key: "16", selected: false, - showname: "16号" + showname: getLabel(111, "16号") }, { key: "17", selected: false, - showname: "17号" + showname: getLabel(111, "17号") }, { key: "18", selected: false, - showname: "18号" + showname: getLabel(111, "18号") }, { key: "19", selected: false, - showname: "19号" + showname: getLabel(111, "19号") }, { key: "20", selected: false, - showname: "20号" + showname: getLabel(111, "20号") }, { key: "21", selected: false, - showname: "21号" + showname: getLabel(111, "21号") }, { key: "22", selected: false, - showname: "22号" + showname: getLabel(111, "22号") }, { key: "23", selected: false, - showname: "23号" + showname: getLabel(111, "23号") }, { key: "24", selected: false, - showname: "24号" + showname: getLabel(111, "24号") }, { key: "25", selected: false, - showname: "25号" + showname: getLabel(111, "25号") }, { key: "26", selected: false, - showname: "26号" + showname: getLabel(111, "26号") }, { key: "27", selected: false, - showname: "27号" + showname: getLabel(111, "27号") }, { key: "28", selected: false, - showname: "28号" + showname: getLabel(111, "28号") }, { key: "29", selected: false, - showname: "29号" + showname: getLabel(111, "29号") }, { key: "30", selected: false, - showname: "30号" + showname: getLabel(111, "30号") }, { key: "31", selected: false, - showname: "31号" + showname: getLabel(111, "31号") } ] } @@ -491,39 +494,39 @@ export const baseSettingFormItem = [ }, { key: "socialSecurityCycleType", - label: "福利台账月份", + label: getLabel(111, "福利台账月份"), type: "SELECT", options: [ { key: "1", selected: false, - showname: "上上月" + showname: getLabel(111, "上上月") }, { key: "2", selected: false, - showname: "上月" + showname: getLabel(111, "上月") }, { key: "3", selected: true, - showname: "本月" + showname: getLabel(111, "本月") }, { key: "4", selected: false, - showname: "下月" + showname: getLabel(111, "下月") } ] }, { key: "namescpoe", - label: "核算人员范围", + label: getLabel(111, "核算人员范围"), type: "CHECKBOX" }, { key: "description", - label: "备注", + label: getLabel(111, "备注"), type: "TEXTAREA" } ]; @@ -531,213 +534,213 @@ export const monthDays = [ { key: "1", selected: true, - showname: "1号" + showname: getLabel(111, "1号") }, { key: "2", selected: false, - showname: "2号" + showname: getLabel(111, "2号") }, { key: "3", selected: false, - showname: "3号" + showname: getLabel(111, "3号") }, { key: "4", selected: false, - showname: "4号" + showname: getLabel(111, "4号") }, { key: "5", selected: false, - showname: "5号" + showname: getLabel(111, "5号") }, { key: "6", selected: false, - showname: "6号" + showname: getLabel(111, "6号") }, { key: "7", selected: false, - showname: "7号" + showname: getLabel(111, "7号") }, { key: "8", selected: false, - showname: "8号" + showname: getLabel(111, "8号") }, { key: "9", selected: false, - showname: "9号" + showname: getLabel(111, "9号") }, { key: "10", selected: false, - showname: "10号" + showname: getLabel(111, "10号") }, { key: "11", selected: false, - showname: "11号" + showname: getLabel(111, "11号") }, { key: "12", selected: false, - showname: "12号" + showname: getLabel(111, "12号") }, { key: "13", selected: false, - showname: "13号" + showname: getLabel(111, "13号") }, { key: "14", selected: false, - showname: "14号" + showname: getLabel(111, "14号") }, { key: "15", selected: false, - showname: "15号" + showname: getLabel(111, "15号") }, { key: "16", selected: false, - showname: "16号" + showname: getLabel(111, "16号") }, { key: "17", selected: false, - showname: "17号" + showname: getLabel(111, "17号") }, { key: "18", selected: false, - showname: "18号" + showname: getLabel(111, "18号") }, { key: "19", selected: false, - showname: "19号" + showname: getLabel(111, "19号") }, { key: "20", selected: false, - showname: "20号" + showname: getLabel(111, "20号") }, { key: "21", selected: false, - showname: "21号" + showname: getLabel(111, "21号") }, { key: "22", selected: false, - showname: "22号" + showname: getLabel(111, "22号") }, { key: "23", selected: false, - showname: "23号" + showname: getLabel(111, "23号") }, { key: "24", selected: false, - showname: "24号" + showname: getLabel(111, "24号") }, { key: "25", selected: false, - showname: "25号" + showname: getLabel(111, "25号") }, { key: "26", selected: false, - showname: "26号" + showname: getLabel(111, "26号") }, { key: "27", selected: false, - showname: "27号" + showname: getLabel(111, "27号") }, { key: "28", selected: false, - showname: "28号" + showname: getLabel(111, "28号") }, { key: "29", selected: false, - showname: "29号" + showname: getLabel(111, "29号") }, { key: "30", selected: false, - showname: "30号" + showname: getLabel(111, "30号") }, { key: "31", selected: false, - showname: "31号" + showname: getLabel(111, "31号") } ]; export const fieldType = [ { key: "STRING", selected: false, - showname: "字符" + showname: getLabel(111, "字符") }, { key: "NUMBER", selected: false, - showname: "数值" + showname: getLabel(111, "数值") } ]; export const valueTaking = [ { key: "INPUT", selected: false, - showname: "输入" + showname: getLabel(111, "输入") }, { key: "FORMULA", selected: false, - showname: "公式" + showname: getLabel(111, "公式") } ]; export const roundingRules = [ { key: "RAW_DATA", selected: false, - showname: "原始数据" + showname: getLabel(111, "原始数据") }, { key: "ROUNDING", selected: false, - showname: "四舍五入" + showname: getLabel(111, "四舍五入") }, { key: "ROUND_UP", selected: false, - showname: "向上舍入" + showname: getLabel(111, "向上舍入") }, { key: "ROUND_DOWN", selected: false, - showname: "向下舍入" + showname: getLabel(111, "向下舍入") }, { key: "CEILING", selected: false, - showname: "见分进角" + showname: getLabel(111, "见分进角") }, { key: "UP_EVEN", selected: false, - showname: "向上求偶" + showname: getLabel(111, "向上求偶") } ]; export const keepDecimalPlaces = [ diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/index.js b/pc4mobx/hrmSalary/pages/ledgerPage/index.js index 65486005..3ad2c0eb 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/index.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/index.js @@ -6,11 +6,13 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaInputSearch, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; import { Button } from "antd"; import LedgerTable from "./components/ledgerTable"; import LedgerSlide from "./components/ledgerSlide"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class Index extends Component { @@ -21,7 +23,7 @@ class Index extends Component { doSearch: false, slideparams: { visible: false, - title: "新建账套", + title: getLabel(111, "新建账套"), editId: "" } }; @@ -36,7 +38,7 @@ class Index extends Component { handleEditLedger = (record) => { const { slideparams } = this.state; const { id } = record; - this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id } }); + this.setState({ slideparams: { ...slideparams, visible: true, title: getLabel(111, "编辑账套"), editId: id } }); }; handleResetLedger = () => { const { slideparams } = this.state; @@ -44,7 +46,7 @@ class Index extends Component { slideparams: { ...slideparams, visible: false, - title: "新建账套", + title: getLabel(111, "新建账套"), editId: "" } }); @@ -58,16 +60,16 @@ class Index extends Component { , + >{getLabel(111, "新建")}, this.setState({ searchVal })} onSearch={() => this.setState({ doSearch: !doSearch })} /> ]; return ( } iconBgcolor="#F14A2D" showDropIcon={false} diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 79752acc..a16f54eb 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -1,10 +1,12 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { message, Tag } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import moment from "moment"; import CustomPaginationTable from "../../components/customPaginationTable"; import "../calculate/index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore", "taxAgentStore") @observer export default class SalarySendList extends React.Component { @@ -40,7 +42,7 @@ export default class SalarySendList extends React.Component { let templateRecord = {}; templateRecord.id = record.templateId; if (!record.templateId) { - message.warning("请设置默认模板"); + message.warning(getLabel(111, "请设置默认模板")); return; } this.props.onEditTemplate && this.props.onEditTemplate(templateRecord); @@ -77,9 +79,9 @@ export default class SalarySendList extends React.Component {
    { record.salaryAcctType === 1 && - 补发 + {getLabel(111, "补发")} } - {`第${record.acctTimes}次`} + {`${getLabel(111, "第")}${record.acctTimes}${getLabel(111, "次")}`}
    ; }; @@ -89,7 +91,7 @@ export default class SalarySendList extends React.Component { ? (result = result.concat([ { - title: "操作", + title: getLabel(111, "操作"), key: "operate", render: (text, record) => { const { sendNum, sendTotal, salaryAcctType, haveBackCalc } = record; @@ -98,15 +100,15 @@ export default class SalarySendList extends React.Component { return ( this.handleGrant(record)} - style={{ marginRight: 10 }}>发放 + style={{ marginRight: 10 }}>{getLabel(111, "发放")} { !showGrant && this.handleShowDetail(record)} - style={{ marginRight: 10 }}>查看详情 + style={{ marginRight: 10 }}>{getLabel(111, "查看详情")} } { sendNum !== sendTotal && !showGrant && - this.handleUpdateTemplate(record)}>更新模板 + this.handleUpdateTemplate(record)}>{getLabel(111, "更新模板")} } ); @@ -116,7 +118,7 @@ export default class SalarySendList extends React.Component { : (result = result.concat([ { - title: "操作", + title: getLabel(111, "操作"), key: "operate", render: (text, record) => { const { salaryAcctType } = record; @@ -124,7 +126,7 @@ export default class SalarySendList extends React.Component { { salaryAcctType === 0 && - this.handleShowDetail(record)}>查看详情 + this.handleShowDetail(record)}>{getLabel(111, "查看详情")} } ); diff --git a/pc4mobx/hrmSalary/pages/payroll/components/backgroundUpload.js b/pc4mobx/hrmSalary/pages/payroll/components/backgroundUpload.js index da0bcf43..992dbc2b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/components/backgroundUpload.js +++ b/pc4mobx/hrmSalary/pages/payroll/components/backgroundUpload.js @@ -1,7 +1,9 @@ import React from "react"; import { Icon, message, Modal, Upload } from "antd"; +import { WeaLocaleProvider } from "ecCom"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; function getBase64(img, callback) { const reader = new FileReader(); reader.addEventListener("load", () => callback(reader.result)); @@ -11,11 +13,11 @@ function getBase64(img, callback) { function beforeUpload(file) { const isJPG = file.type === "image/jpeg" || file.type === "image/png"; if (!isJPG) { - message.error("只允许上传jpg、png类型的图片!"); + message.error(getLabel(111, "只允许上传jpg、png类型的图片!")); } const isLt2M = file.size / 1024 / 1024 < 2; if (!isLt2M) { - message.error("图片大小限制2MB!"); + message.error(getLabel(111, "图片大小限制2MB!")); } return isJPG && isLt2M; } diff --git a/pc4mobx/hrmSalary/pages/payroll/copyModal.js b/pc4mobx/hrmSalary/pages/payroll/copyModal.js index c8347b51..1ed29020 100644 --- a/pc4mobx/hrmSalary/pages/payroll/copyModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/copyModal.js @@ -1,8 +1,9 @@ import React from "react"; import { notNull } from "../../util/validate"; import { Button, Col, Row } from "antd"; -import { WeaDialog, WeaError, WeaInput } from "ecCom"; +import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export default class CopyModal extends React.Component { constructor(props) { super(props); @@ -28,7 +29,7 @@ export default class CopyModal extends React.Component { return ( { this.props.onCancel(); @@ -36,16 +37,16 @@ export default class CopyModal extends React.Component { buttons={[ + }}>{getLabel(111, "保存")} ]}> - - 工资单名称 + + {getLabel(111, "工资单名称")} + error={getLabel(111, "请填写工资单名称")}> { deletePayroll([record.id]); } @@ -187,8 +187,8 @@ export default class Payroll extends React.Component { if (selectedTab === 0) { if (!this.validateStep1()) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -196,8 +196,8 @@ export default class Payroll extends React.Component { const { salaryTemplateShowSet } = payrollStore; if (!salaryTemplateShowSet.theme) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -250,11 +250,11 @@ export default class Payroll extends React.Component { } const topTab = [ { - title: "工资单发放", + title: getLabel(111, "工资单发放"), viewcondition: "0" }, { - title: "工资单模板设置", + title: getLabel(111, "工资单模板设置"), viewcondition: "1" } ]; @@ -263,7 +263,7 @@ export default class Payroll extends React.Component { return
    @@ -275,7 +275,7 @@ export default class Payroll extends React.Component { format="YYYY-MM" onChange={(val) => this.handleRangePickerChange("startDate", val)} /> - + {getLabel(111, "至")} { @@ -294,7 +294,7 @@ export default class Payroll extends React.Component { showOperateBtn && + }}>{getLabel(111, "新建")} } { showOperateBtn && @@ -304,28 +304,28 @@ export default class Payroll extends React.Component { onClick={() => { const selectedRowKeys = toJS(templateStore.selectedRowKeys); if (!selectedRowKeys.length) { - message.info("未选中任何数据!"); + message.info(getLabel(111, "未选中任何数据")); return; } Modal.confirm({ - title: "信息确认", - content: `确定要将所选的工资单模板(共${selectedRowKeys.length}条数据)删除吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确定要将所选的工资单模板")}(${getLabel(111, "共")}${selectedRowKeys.length}${getLabel(111, "条数据")})${getLabel(111, "删除吗")}?`, onOk: () => { deletePayroll(selectedRowKeys); } }); }} - >批量删除工资单模板 + >{getLabel(111, "批量删除工资单模板")} } { this.state.initSelected && { this.handleTemplateSelectChange(value); }}/> } - { this.setState({ templateSearchValue: value }); }} onSearch={(value) => { @@ -335,17 +335,17 @@ export default class Payroll extends React.Component { ); } }; - const steps = ["基础设置", "正常核算工资单模板", "补发工资单模版"]; + const steps = [getLabel(111, "基础设置"), getLabel(111, "正常核算工资单模板"), getLabel(111, "补发工资单模版")]; const nextStep = () => { if (!this.validateStep1()) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } if (templateBaseData.replenishName === templateBaseData.name) { - message.error("工资单模板名称和补发工资单模板名称不可相同"); + message.error(getLabel(111, "工资单模板名称和补发工资单模板名称不可相同")); return; } this.setState({ @@ -362,7 +362,7 @@ export default class Payroll extends React.Component { return (
    } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 @@ -422,24 +422,24 @@ export default class Payroll extends React.Component { currentStep === 0 ? [ + }}>{getLabel(111, "下一步")} ] : currentStep === 1 ? [ , - , + }}>{getLabel(111, "上一步")}, + , + }}>{getLabel(111, "预览")} ] : currentStep === 2 ? [ , - + }}>{getLabel(111, "上一步")}, + ] : [] } - title="新建工资单模板" + title={getLabel(111, "新建工资单模板")} content={
    { @@ -468,11 +468,11 @@ export default class Payroll extends React.Component { measure="%" title={ { this.handleUpdateSave(); - }}>保存 + }}>{getLabel(111, "保存")} ] : selectedTab === 1 ? [ , - + }}>{getLabel(111, "保存")}, + ] : [ + }}>{getLabel(111, "保存")} ] } subItemChange={(selectedTab) => { diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index 6c0a5a3f..d8743024 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -1,6 +1,6 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { WeaHelpfulTip, WeaTab } from "ecCom"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaTab } from "ecCom"; import { Button, Spin } from "antd"; import { getQueryString } from "../../../util/url"; import { removePropertyCondition } from "../../../util/response"; @@ -9,6 +9,7 @@ import { getPayrollDetailList, getPayrollDetailSa, getPayrollInfo, salaryBillSen import { sysConfCodeRule } from "../../../apis/ruleconfig"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @observer export default class PayrollDetail extends React.Component { @@ -142,15 +143,15 @@ export default class PayrollDetail extends React.Component { const { setDetailListShowSearchAd, detailListShowSearchAd, detailListConditionForm } = payrollStore; const { salaryMonth, template, sendNum, sendTotal } = salarySendDetailBaseInfo; const adBtn = [ - , - , - + , + , + ]; return (
    导出全部]} + searchType={["base", "advanced"]} searchsBasePlaceHolder={getLabel(111, "请输入姓名")} + buttons={[]} showSearchAd={detailListShowSearchAd} setShowSearchAd={bool => setDetailListShowSearchAd(bool)} searchsAd={getSearchs(detailListConditionForm, condition, 2)} buttonsAd={adBtn} onSearch={this.handleSearch} @@ -159,18 +160,18 @@ export default class PayrollDetail extends React.Component { />
    - 薪资所属月:{salaryMonth} + {getLabel(111, "薪资所属月")}:{salaryMonth} } placement="topLeft" /> - 工资单模板:{template} + {getLabel(111, "工资单模板")}:{template}
    - 已发放:{sendNum}/{sendTotal} + {getLabel(111, "已发放")}:{sendNum}/{sendTotal}
    @@ -195,13 +196,13 @@ export const PayrollTips = (props) => { const { fromDate, endDate } = salaryCycle; const { fromDate: aFromDate, endDate: aEndDate } = attendCycle; return
    -
    薪资周期
    -
    {fromDate}{endDate}
    -
    税款所属期
    +
    {getLabel(111, "薪资周期")}
    +
    {fromDate}{getLabel(111, "至")}{endDate}
    +
    {getLabel(111, "税款所属期")}
    {taxCycle}
    -
    考勤取值周期
    -
    {aFromDate}{aEndDate}
    -
    福利台账月份
    -
    {`引用的${socialSecurityCycle}福利台账数据`}
    +
    {getLabel(111, "考勤取值周期")}
    +
    {aFromDate}{getLabel(111, "至")}{aEndDate}
    +
    {getLabel(111, "福利台账月份")}
    +
    {`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}
    ; }; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 71327ee1..5ca7c853 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { WeaDropdown, WeaHelpfulTip, WeaTab, WeaTop } from "ecCom"; +import { WeaDropdown, WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTop } from "ecCom"; import { Button, Dropdown, Menu, message } from "antd"; import "./index.less"; import { getQueryString } from "../../../util/url"; @@ -10,7 +10,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; const { ButtonSelect } = WeaDropdown; - +const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @observer export default class PayrollGrant extends React.Component { @@ -22,7 +22,7 @@ export default class PayrollGrant extends React.Component { selectedKey: "0", payrollPartModalParams: { visible: false, - title: "工资单发放", + title: getLabel(111, "工资单发放"), grantType: "", salarySendId: "" } @@ -98,7 +98,7 @@ export default class PayrollGrant extends React.Component { break; case "SELECT": if (selectedRowKeys.length === 0) { - message.warning("未选择发放条目"); + message.warning(getLabel(111, "未选择发放条目")); return; } this.fetchGrantPayRoll({ @@ -134,7 +134,7 @@ export default class PayrollGrant extends React.Component { break; case "recallSelected": if (selectedRowKeys.length === 0) { - message.warning("未选择撤回条目"); + message.warning(getLabel(111, "未选择撤回条目")); return; } this.fetchWithdrawPayroll({ @@ -147,7 +147,7 @@ export default class PayrollGrant extends React.Component { payrollPartModalParams: { ...payrollPartModalParams, visible: true, - title: "工资单撤回", + title: getLabel(111, "工资单撤回"), salarySendId: currentId, grantType: "withdraw" } @@ -221,17 +221,17 @@ export default class PayrollGrant extends React.Component { return [ ...toJS(columns), { - title: "操作", + title: getLabel(111, "操作"), key: "", dataIndex: "", display: true, render: (text, record) => { - if (record.sendStatus === "已发放" && !notShowGrantOrWithdraw) { + if (record.sendStatus === getLabel(111, "已发放") && !notShowGrantOrWithdraw) { return ( this.handleWithdraw({ ids: [record.id] })}> - 撤回 + {getLabel(111, "撤回")} ); } else if (!notShowGrantOrWithdraw) { @@ -239,7 +239,7 @@ export default class PayrollGrant extends React.Component { this.handleGrant({ ids: [record.id] })}> - 发放 + {getLabel(111, "发放")} ); } @@ -267,24 +267,24 @@ export default class PayrollGrant extends React.Component { }; const menu = ( - 全部导出 - 导出选中 + {getLabel(111, "全部导出")} + {getLabel(111, "导出选中")} ); let btnDom = [ - 更多 + {getLabel(111, "更多")} ]; if (selectedKey === "0" && !notShowGrantOrWithdraw) { btnDom = [ this.sendPayroll(key)} />, @@ -294,11 +294,11 @@ export default class PayrollGrant extends React.Component { btnDom = [ this.withdrawalPayroll(key)} />, @@ -320,7 +320,7 @@ export default class PayrollGrant extends React.Component { const { selectedRowKeys, currentId, selectedKey } = this.state; const { payrollStore: { exportPayroll } } = this.props; if (selectedRowKeys.length === 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } exportPayroll({ @@ -374,7 +374,7 @@ export default class PayrollGrant extends React.Component { payrollPartModalParams: { ...payrollPartModalParams, visible: false, - title: "工资单发放", + title: getLabel(111, "工资单发放"), grantType: "", salarySendId: "" } @@ -401,29 +401,29 @@ export default class PayrollGrant extends React.Component { const adBtn = [ // 高级搜索内部按钮 , , ]; const topTab = [ { - title: "未发送", + title: getLabel(111, "未发送"), viewcondition: "0" }, { - title: "已发送", + title: getLabel(111, "已发送"), viewcondition: "1" } ]; return (
    } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 @@ -443,7 +443,7 @@ export default class PayrollGrant extends React.Component { }) } searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮 - searchsBasePlaceHolder="请输入姓名" + searchsBasePlaceHolder={getLabel(111, "请输入姓名")} showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板 setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控 searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据 @@ -455,7 +455,7 @@ export default class PayrollGrant extends React.Component {
    - 薪资所属月:{salarySendDetailBaseInfo.salaryMonth} + {getLabel(111, "薪资所属月")}:{salarySendDetailBaseInfo.salaryMonth} - 工资单模板:{salarySendDetailBaseInfo.template} + {getLabel(111, "工资单模板")}:{salarySendDetailBaseInfo.template}
    - 已发放:{salarySendDetailBaseInfo.sendNum}/ {salarySendDetailBaseInfo.sendTotal} @@ -515,20 +515,20 @@ export const TitleHelp = (props) => { const { salaryCycle = {}, attendCycle = {} } = salarySobCycle; return
    -

    薪资周期

    -

    {salaryCycle.fromDate}{salaryCycle.endDate}

    +

    {getLabel(111, "薪资周期")}

    +

    {salaryCycle.fromDate}{getLabel(111, "至")}{salaryCycle.endDate}

    -

    税款所属期

    +

    {getLabel(111, "税款所属期")}

    {salarySobCycle.taxCycle}

    -

    考勤取值周期

    -

    {attendCycle.fromDate}{attendCycle.endDate}

    +

    {getLabel(111, "考勤取值周期")}

    +

    {attendCycle.fromDate}{getLabel(111, "至")}{attendCycle.endDate}

    -

    福利台账月份

    -

    {`引用${salarySobCycle.socialSecurityCycle}的福利台账数据`}

    +

    {getLabel(111, "福利台账月份")}

    +

    {`${getLabel(111, "引用")}${salarySobCycle.socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}

    ; }; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartModal.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartModal.js index 766fc73f..81a2a595 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/payrollPartModal.js @@ -6,12 +6,14 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom"; import { Button, message, Modal } from "antd"; import { commonEnumList } from "../../../apis/ruleconfig"; import { sendRangeSave } from "../../../apis/payroll"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class PayrollPartModal extends Component { @@ -24,7 +26,7 @@ class PayrollPartModal extends Component { { viewAttr: 3, key: "include", - label: "对象", + label: getLabel(111, "对象"), targetType: "1", targetTypeIds: "", targetTypeIdsNames: "" @@ -32,7 +34,7 @@ class PayrollPartModal extends Component { { viewAttr: 2, key: "exclude", - label: "对象中排除", + label: getLabel(111, "对象中排除"), targetType: "1", targetTypeIds: "", targetTypeIdsNames: "" @@ -79,8 +81,8 @@ class PayrollPartModal extends Component { _.isEmpty(_.find(personalAddItem, item => item.viewAttr === 3).targetTypeIds) ) { Modal.warning({ - title: "信息确认", - content: "必要信息不完整,红色*为必填项!" + title: getLabel(111, "信息确认"), + content: getLabel(111, "必要信息不完整,红色*为必填项!") }); return; } @@ -116,11 +118,11 @@ class PayrollPartModal extends Component { sendRangeSave(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(111, "保存成功")); this.handleReset(); onCancel(); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(111, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -170,16 +172,16 @@ class PayrollPartModal extends Component { } else { switch (targetType) { case "1": - browserType = { ...browserType, type: 17, title: "人员选择" }; + browserType = { ...browserType, type: 17, title: getLabel(111, "人员选择") }; break; case "2": - browserType = { ...browserType, type: 57, title: "部门选择" }; + browserType = { ...browserType, type: 57, title: getLabel(111, "部门选择") }; break; case "3": - browserType = { ...browserType, type: 164, title: "分部选择" }; + browserType = { ...browserType, type: 164, title: getLabel(111, "分部选择") }; break; case "4": - browserType = { ...browserType, type: 278, title: "岗位选择" }; + browserType = { ...browserType, type: 278, title: getLabel(111, "岗位选择") }; break; default: break; @@ -213,7 +215,7 @@ class PayrollPartModal extends Component { { viewAttr: 3, key: "include", - label: "对象", + label: getLabel(111, "对象"), targetType: "1", targetTypeIds: "", targetTypeIdsNames: "" @@ -221,7 +223,7 @@ class PayrollPartModal extends Component { { viewAttr: 2, key: "exclude", - label: "对象中排除", + label: getLabel(111, "对象中排除"), targetType: "1", targetTypeIds: "", targetTypeIdsNames: "" @@ -234,14 +236,14 @@ class PayrollPartModal extends Component { const { onCancel, visible } = this.props; const { targetTypeList, personalAddItem, loading } = this.state; const buttons = [ - , - + , + ]; return ( { sendRangeDelete(selectedRowKeys).then(({ status, errormsg }) => { if (status) { - message.success("刪除成功"); + message.success(getLabel(111, "刪除成功")); this.setState({ selectedRowKeys: [] }, () => { this.sendRangeList({ grantType, salarySendId, @@ -84,7 +85,7 @@ class PayrollPartTable extends Component { }); }); } else { - message.error(errormsg || "刪除失败"); + message.error(errormsg || getLabel(111, "刪除失败")); } }); }, @@ -96,12 +97,12 @@ class PayrollPartTable extends Component { const { grantType, salarySendId, onWithdraw, onGrant } = this.props; const { selectedRowKeys } = this.state; if (_.isEmpty(selectedRowKeys)) { - message.warning("您没有需要处理的对象!"); + message.warning(getLabel(111, "您没有需要处理的对象!")); return; } Modal.confirm({ - title: "信息确认", - content: `您共选择${selectedRowKeys.length}个对象,确定要${grantType === "grant" ? "发放" : "撤回"}吗?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "您共选择")}${selectedRowKeys.length}${getLabel(111, "个对象")},${getLabel(111, "确定要")}${grantType === "grant" ? getLabel(111, "发放") : getLabel(111, "撤回")}?`, onCancel: () => { }, onOk: () => { @@ -119,7 +120,7 @@ class PayrollPartTable extends Component { const { onCancel, visible, grantType, salarySendId, title } = this.props; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, pageSizeOptions: ["10", "20", "50", "100"], onChange: current => { @@ -157,7 +158,7 @@ class PayrollPartTable extends Component { searchValue={searchValue} onChange={(searchValue) => this.setState({ searchValue })} onSearch={() => this.sendRangeList({ grantType, salarySendId })} - placeholder="请输入方案名称" + placeholder={getLabel(111, "请输入方案名称")} />
    + @@ -90,7 +91,7 @@ export default class BaseInformForm extends React.Component { } @@ -101,7 +102,7 @@ export default class BaseInformForm extends React.Component { /> @@ -112,12 +113,12 @@ export default class BaseInformForm extends React.Component { /> @@ -140,7 +141,7 @@ export default class BaseInformForm extends React.Component { } diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemModal.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemModal.js index 1eea09a3..a15392b2 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemModal.js @@ -5,15 +5,17 @@ * Date: 2023/2/2 */ import React, { Component } from "react"; -import { WeaDialog } from "ecCom"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; import { Button } from "antd"; +const getLabel = WeaLocaleProvider.getLabel; + class SalaryItemModal extends Component { render() { const { visible, title, onCancel, onConfirm } = this.props; const buttons = [ - , - + , + ]; return ( { Modal.confirm({ - title: "信息确认", - content: "确认删除", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除吗?"), onOk: () => { let resultSalaryItemSet = [...this.state.dataList]; resultSalaryItemSet.map((sourceGroup, index) => { @@ -103,7 +104,7 @@ class SalaryItemSettings extends Component { }); }; handleOpenModal = (record, title, isItem) => { - if (title === "分类名称编辑") { + if (title === getLabel(111, "分类名称编辑")) { const { modalPayload } = this.state; this.setState({ modalPayload: { @@ -226,11 +227,11 @@ class SalaryItemSettings extends Component { {item.groupName} - this.handleOpenModal(item, "分类名称编辑")}/> + this.handleOpenModal(item, getLabel(111, "分类名称编辑"))}/> this.handleDeleteClick(item)}/> - this.handleOpenModal(item, "请选择薪资项目", true)}/> + this.handleOpenModal(item, getLabel(111, "请选择薪资项目"), true)}/>
    { @@ -255,7 +256,7 @@ class SalaryItemSettings extends Component { }} className="wea-sortable-salary-item" /> : -
    暂无数据
    +
    {getLabel(111, "暂无数据")}
    }
    ; @@ -265,8 +266,8 @@ class SalaryItemSettings extends Component {
    { - modalPayload.title === "分类名称编辑" ? - + modalPayload.title === getLabel(111, "分类名称编辑") ? + : - +
    @@ -67,17 +67,17 @@ export default class ShowSettingForm extends React.Component { this.handleChange({ theme: value }); }}/> - 插入变量: + {getLabel(111, "插入变量")}: { this.handleThemeNameCllck("${companyName}"); - }} className="themeFormalStr" style={{ marginRight: "10px" }}>公司名称 + }} className="themeFormalStr" style={{ marginRight: "10px" }}>{getLabel(111, "公司名称")} { this.handleThemeNameCllck("${salaryMonth}"); - }} className="themeFormalStr">薪资所属月 + }} className="themeFormalStr">{getLabel(111, "薪资所属月")} @@ -86,7 +86,7 @@ export default class ShowSettingForm extends React.Component { }}/> @@ -95,19 +95,19 @@ export default class ShowSettingForm extends React.Component { }}/> { this.handleChange({ textContentPosition: e.target.value }); }}> - 薪资项目前 - 薪资项目后 + {getLabel(111, "薪资项目前")} + {getLabel(111, "薪资项目后")} @@ -116,7 +116,7 @@ export default class ShowSettingForm extends React.Component { }}/> @@ -130,9 +130,9 @@ export default class ShowSettingForm extends React.Component { - 薪资项目设置 + {getLabel(111, "薪资项目设置")} this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, "添加分类")}/> + onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, getLabel(111, "添加分类"))}/>
    } items={[]} needTigger showGroup diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js index ad0fabfe..dc7006eb 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/tmplateSettingForm.js @@ -1,11 +1,11 @@ import React from "react"; -import { WeaButtonIcon, WeaSearchGroup } from "ecCom"; +import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import "./index.less"; import SalaryItemSettings from "./salaryItemSettings"; - +const getLabel = WeaLocaleProvider.getLabel; @inject("payrollStore") @observer export default class TemplateSettingForm extends React.Component { @@ -22,9 +22,9 @@ export default class TemplateSettingForm extends React.Component { - 薪资项目设置 + {getLabel(111, "薪资项目设置")} this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, "添加分类")}/> + onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, getLabel(111, "添加分类"))}/>
    } items={[]} needTigger showGroup> diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 3bf2d4a9..406f0bb1 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -1,11 +1,21 @@ import React from "react"; import { Button, Col, Icon, message, Modal, Row } from "antd"; -import { WeaCheckbox, WeaDialog, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom"; +import { + WeaCheckbox, + WeaDialog, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaLocaleProvider, + WeaSelect, + WeaTextarea +} from "ecCom"; import { inject, observer } from "mobx-react"; import { testFormual } from "../../apis/item"; import TestModal from "./testModal"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("salaryItemStore") @observer export default class FormalFormModal extends React.Component { @@ -199,8 +209,8 @@ export default class FormalFormModal extends React.Component { }); this.parameters = result; let params = { - name: "公式1", - description: "备注", + name: getLabel(111, "公式1"), + description: getLabel(111, "备注"), module: "salary", useFor: "salaryitem", returnType: this.props.dataType || this.state.returnType, @@ -265,7 +275,7 @@ export default class FormalFormModal extends React.Component { if (!record && !value) { this.parameters = _.map(this.parameters, item => ({ ...item, content: null })); this.setState({ - showTestVal: "显示结果" + showTestVal: getLabel(111, "显示结果") }); } else { this.parameters = _.map(this.parameters, item => { @@ -310,7 +320,7 @@ export default class FormalFormModal extends React.Component { }; testFormual(params).then(({ status, data, errormsg }) => { if (status) { - message.success("测试结果已更新"); + message.success(getLabel(111, "测试结果已更新")); this.setState({ showTestVal: data }); @@ -325,16 +335,16 @@ export default class FormalFormModal extends React.Component { const { searchGroup, searchFields } = salaryItemStore; const { value, formulaDatasourceList, extendParam, testVisible, showTestVal, formalua } = this.state; const title =
    -
    {`${(this.props.valueType == 2 || this.props.valueType === "FORMULA") ? "函数" : "SQL"}公式`}
    +
    {`${(this.props.valueType == 2 || this.props.valueType === "FORMULA") ? getLabel(111, "函数") : "SQL"}${getLabel(111, "公式")}`}
    { value && + }}>{getLabel(111, "测试")} } {/*公式测试*/} 保存 + ]} className="formula-wrapper" initLoadCss @@ -362,7 +372,7 @@ export default class FormalFormModal extends React.Component { @@ -373,7 +383,7 @@ export default class FormalFormModal extends React.Component { @@ -383,8 +393,8 @@ export default class FormalFormModal extends React.Component { onChange={(datasourceId) => { if (datasourceId) { Modal.confirm({ - title: "信息确认", - content: "外部数据源指第三方数据库,连接第三方数据库会影响核算效率。", + title: getLabel(111, "信息确认"), + content: getLabel(111, "外部数据源指第三方数据库,连接第三方数据库会影响核算效率。"), onOk: () => { this.setState({ extendParam: { ...extendParam, datasource: { datasourceId } } }); }, @@ -399,14 +409,14 @@ export default class FormalFormModal extends React.Component { /> @@ -420,7 +430,7 @@ export default class FormalFormModal extends React.Component { /> @@ -449,7 +459,7 @@ export default class FormalFormModal extends React.Component { marginRight: "10px" }}>
    -
    变量
    +
    {getLabel(111, "变量")}
    { searchGroup && searchGroup.map(item => { @@ -459,7 +469,7 @@ export default class FormalFormModal extends React.Component { }}> {item.value} - {item.value} 的字段 + {item.value} {getLabel(111, "的字段")}
    ; }) } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/options.js b/pc4mobx/hrmSalary/pages/salaryItem/options.js index e80e8b89..f9ffce5c 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/options.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/options.js @@ -1,78 +1,81 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const roundingModeOptions = [ - { - key: "1", - selected: false, - showname: "原始数据" - }, - { - key: "2", - selected: false, - showname: "四舍五入" - }, - { - key: "3", - selected: false, - showname: "向上舍入" - }, - { - key: "4", - selected: false, - showname: "向下舍入" - }, - { - key: "5", - selected: false, - showname: "见分进角" - } + { + key: "1", + selected: false, + showname: getLabel(111, "原始数据") + }, + { + key: "2", + selected: false, + showname: getLabel(111, "四舍五入") + }, + { + key: "3", + selected: false, + showname: getLabel(111, "向上舍入") + }, + { + key: "4", + selected: false, + showname: getLabel(111, "向下舍入") + }, + { + key: "5", + selected: false, + showname: getLabel(111, "见分进角") + } ]; export const patternOptions = [ - { - key: "0", - showname: "0", - selected: false - }, - { - key: "1", - showname: "1", - selected: false - }, - { - key: "2", - showname: "2", - selected: false - }, - { - key: "3", - showname: "3", - selected: false - }, - { - key: "4", - showname: "4", - selected: false - }, - { - key: "5", - showname: "5", - selected: false - }, - { - key: "6", - showname: "6", - selected: false - }, -] + { + key: "0", + showname: "0", + selected: false + }, + { + key: "1", + showname: "1", + selected: false + }, + { + key: "2", + showname: "2", + selected: false + }, + { + key: "3", + showname: "3", + selected: false + }, + { + key: "4", + showname: "4", + selected: false + }, + { + key: "5", + showname: "5", + selected: false + }, + { + key: "6", + showname: "6", + selected: false + } +]; export const dataTypeOptions = [ - { - key: "number", - showname: "数值", - selected: false - }, - { - key: "string", - showname: "字符", - selected: false - }, -] + { + key: "number", + showname: getLabel(111, "数值"), + selected: false + }, + { + key: "string", + showname: getLabel(111, "字符"), + selected: false + } +]; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/testModal.js b/pc4mobx/hrmSalary/pages/salaryItem/testModal.js index d728a379..a05e199b 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/testModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/testModal.js @@ -1,9 +1,10 @@ import React from "react"; import { Button } from "antd"; -import { WeaDialog, WeaInput, WeaSearchGroup, WeaTable, WeaTextarea } from "ecCom"; +import { WeaDialog, WeaInput, WeaSearchGroup, WeaTable, WeaTextarea, WeaLocaleProvider } from "ecCom"; import { inject, observer } from "mobx-react"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("ledgerStore") @observer export default class TestModal extends React.Component { @@ -11,7 +12,7 @@ export default class TestModal extends React.Component { super(props); this.state = { testValue: [], - showResults: "显示结果" + showResults: getLabel(111, "显示结果") }; } @@ -39,10 +40,10 @@ export default class TestModal extends React.Component { }) : []; const columns = [ { - dataIndex: "paramsName", title: "参数名" + dataIndex: "paramsName", title: getLabel(111, "参数名") }, { - dataIndex: "content", title: "测试值", + dataIndex: "content", title: getLabel(111, "测试值"), render: (text, record) => { return ( 执行 + ]}>
    - {this.renderInputItem()} - + {this.renderInputItem()} +
    @@ -88,8 +89,8 @@ export default class TestModal extends React.Component { const TestTip = () => { return
    -
    涉及到选择具体数据进行运算时,请先检查对应数据源中是否有数据项;
    -
    涉及到日期控件时,请先选择日期控件的格式,保持和控件本身设置的格式一致,否则可能会导致预期与实际执行结果不一致;
    -
    涉及到日期控件判断与预期不符合时,请先检查日期控件的格式是否与等号右边的格式保持一致;
    +
    {getLabel(111, "涉及到选择具体数据进行运算时,请先检查对应数据源中是否有数据项;")}
    +
    {getLabel(111, "涉及到日期控件时,请先选择日期控件的格式,保持和控件本身设置的格式一致,否则可能会导致预期与实际执行结果不一致;")}
    +
    {getLabel(111, "涉及到日期控件判断与预期不符合时,请先检查日期控件的格式是否与等号右边的格式保持一致;")}
    ; }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js index 6d207c8e..ffa8dbe7 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee.js @@ -170,7 +170,7 @@ export const SelectWithAll = payload => {
    onChangeAll({ selected, showName })} diff --git a/pc4mobx/hrmSalary/pages/sysConfig/conditions.js b/pc4mobx/hrmSalary/pages/sysConfig/conditions.js index a5ff1244..024d3c35 100644 --- a/pc4mobx/hrmSalary/pages/sysConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/sysConfig/conditions.js @@ -1,3 +1,6 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const sysConditions = [ { items: [ @@ -7,10 +10,10 @@ export const sysConditions = [ domkey: ["confKey"], fieldcol: 14, rules: "required|string", - label: "标识", + label: getLabel(111, "标识"), labelcol: 6, value: "", - viewAttr: 3, + viewAttr: 3 }, { colSpan: 1, @@ -18,10 +21,10 @@ export const sysConditions = [ domkey: ["confValue"], fieldcol: 14, rules: "required|string", - label: "值", + label: getLabel(111, "值"), labelcol: 6, value: "", - viewAttr: 3, + viewAttr: 3 }, { colSpan: 1, @@ -29,12 +32,12 @@ export const sysConditions = [ domkey: ["title"], fieldcol: 14, rules: "required|string", - label: "标题", + label: getLabel(111, "标题"), labelcol: 6, value: "", - viewAttr: 3, - }, + viewAttr: 3 + } ], - defaultshow: true, - }, + defaultshow: true + } ]; diff --git a/pc4mobx/hrmSalary/pages/sysConfig/index.js b/pc4mobx/hrmSalary/pages/sysConfig/index.js index a2898680..41df3da7 100644 --- a/pc4mobx/hrmSalary/pages/sysConfig/index.js +++ b/pc4mobx/hrmSalary/pages/sysConfig/index.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaDialog, WeaTable, WeaTop } from "ecCom"; +import { WeaDialog, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { WeaForm } from "comsMobx"; import { Button, message } from "antd"; import SysForm from "./components/sysForm"; @@ -8,6 +8,7 @@ import * as API from "../../apis/sysconfig"; import "./index.less"; import _ from "lodash"; +const getLabel = WeaLocaleProvider.getLabel; export default class SysConfig extends React.Component { constructor(props) { super(props); @@ -27,7 +28,7 @@ export default class SysConfig extends React.Component { }, modalProps: { visible: false, - title: "新增配置项", + title: getLabel(111, "新增配置项"), formId: "" } }; @@ -50,7 +51,7 @@ export default class SysConfig extends React.Component { const { columns, list: dataSource, total, pageSize, pageNum: current } = data; this.setState({ columns: [...columns, { - title: "操作", + title: getLabel(111, "操作"), key: "operation", render: (text, record) => ( @@ -58,10 +59,10 @@ export default class SysConfig extends React.Component { modalProps: { ...this.state.modalProps, visible: true, - title: "编辑配置项", + title: getLabel(111, "编辑配置项"), formId: record.id } - }, () => this.getSysDetail(record.id))}>编辑 + }, () => this.getSysDetail(record.id))}>{getLabel(111, "编辑")} ) }], @@ -96,13 +97,13 @@ export default class SysConfig extends React.Component { API.sysSave(payload).then(({ status, errormsg }) => { this.setState({ loading: { ...loading, add: false } }); if (status) { - message.success("新增成功"); - this.setState({ modalProps: { ...modalProps, visible: false, title: "新增配置项", formId: "" } }, () => { + message.success(getLabel(111, "新增成功")); + this.setState({ modalProps: { ...modalProps, visible: false, title: getLabel(111, "新增配置项"), formId: "" } }, () => { this.getSysList(); form.reset(); }); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); }; @@ -112,13 +113,13 @@ export default class SysConfig extends React.Component { API.sysUpdate(payload).then(({ status, errormsg }) => { this.setState({ loading: { ...loading, update: false } }); if (status) { - message.success("更新成功"); - this.setState({ modalProps: { ...modalProps, visible: false, title: "新增配置项", formId: "" } }, () => { + message.success(getLabel(111, "更新成功")); + this.setState({ modalProps: { ...modalProps, visible: false, title: getLabel(111, "新增配置项"), formId: "" } }, () => { this.getSysList(); form.reset(); }); } else { - message.error(errormsg || "更新失败"); + message.error(errormsg || getLabel(111, "更新失败")); } }); }; @@ -142,11 +143,11 @@ export default class SysConfig extends React.Component { const btns = [ + })}>{getLabel(111, "新增")} ]; const pagination = { total: pageInfo.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -164,7 +165,7 @@ export default class SysConfig extends React.Component { return (
    系统配置} + title={{getLabel(111, "系统配置")}} icon={} iconBgcolor="#F14A2D" buttons={btns} @@ -185,13 +186,20 @@ export default class SysConfig extends React.Component { modalProps: { ...modalProps, visible: false, - title: "新增配置项", + title: getLabel(111, "新增配置项"), formId: "" } - })}>取消, - + })}>{getLabel(111, "取消")}, + ]} - onCancel={() => this.setState({ modalProps: { ...modalProps, visible: false, title: "新增配置项", formId: "" } })} + onCancel={() => this.setState({ + modalProps: { + ...modalProps, + visible: false, + title: getLabel(111, "新增配置项"), + formId: "" + } + })} > { modalProps.visible && diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 23d14a23..3027763d 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,8 +1,9 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect } from "ecCom"; import "../ledger/index.less"; +const getLabel = WeaLocaleProvider.getLabel; export default class AddTaxAgentModal extends React.Component { constructor(props) { super(props); @@ -24,7 +25,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ checkAll: "1" }); - }else{ + } else { this.setState({ checkAll: "0" }); @@ -64,7 +65,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ selectedKey: "EMPLOYEE", checkboxValue: "", - checkAll: '0', + checkAll: "0", ids: "" }); }; @@ -81,18 +82,18 @@ export default class AddTaxAgentModal extends React.Component { style={{ width: 600 }} initLoadCss className="associatesWrapper" - title="关联人员" + title={getLabel(111, "关联人员")} buttons={[ , ]}>
    - 对象类型 + {getLabel(111, "对象类型")}
    + error={getLabel(111, "请选择人员")}> { @@ -132,11 +133,11 @@ export default class AddTaxAgentModal extends React.Component { + error={getLabel(111, "请选择部门")}> + error={getLabel(111, "请选择分部")}> + error={getLabel(111, "请选择岗位")}> - 选择员工状态 + {getLabel(111, "选择员工状态")} - { + error={getLabel(111, "请选择员工状态")}> + { if (checkAll === "1") { const checked = _.map(employeeStatus, it => it.id); this.setState({ - checkAll: '1', + checkAll: "1", checkboxValue: checked.join(",") }); } else { this.setState({ - checkAll: '0', - checkboxValue: '' + checkAll: "0", + checkboxValue: "" }); } }}/> diff --git a/pc4mobx/hrmSalary/pages/taxAgent/columns.js b/pc4mobx/hrmSalary/pages/taxAgent/columns.js index c9326873..627ef8f9 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/columns.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/columns.js @@ -1,51 +1,54 @@ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ { - title: "序号", + title: getLabel(111, "序号"), dataIndex: "title", key: "title" }, { - title: "个税扣缴义务人", + title: getLabel(111, "个税扣缴义务人"), dataIndex: "title", key: "title" }, { - title: "备注", + title: getLabel(111, "备注"), dataIndex: "title", key: "title" }, { - title: "操作", + title: getLabel(111, "操作"), dataIndex: "title", key: "title" } ]; export const importEmployColumns = [ { - title: "姓名", + title: getLabel(111, "姓名"), dataIndex: "username", key: "username" }, { - title: "部门", + title: getLabel(111, "部门"), dataIndex: "departmentName", key: "departmentName" }, { - title: "工号", + title: getLabel(111, "工号"), dataIndex: "jobNum", key: "jobNum" }, { - title: "手机号", + title: getLabel(111, "手机号"), dataIndex: "mobile", key: "mobile" }, { - title: "员工状态", + title: getLabel(111, "员工状态"), dataIndex: "employeeStatus", key: "employeeStatus" - }, + } ]; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js index 661859ab..672c3598 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/editConditions.js @@ -4,6 +4,9 @@ * Date: 2022-05-30 22:39:03 * LastEditTime: 2022-06-09 14:00:30 */ +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export const editConditions = [ { items: [ @@ -13,10 +16,10 @@ export const editConditions = [ domkey: ["name"], fieldcol: 14, rules: "required|string", - label: "名称", + label: getLabel(111, "名称"), labelcol: 6, value: "", - viewAttr: 3, + viewAttr: 3 }, { browserConditionParam: { @@ -35,33 +38,33 @@ export const editConditions = [ pageSize: 10, quickSearchName: "", replaceDatas: [], - title: "人力资源", + title: getLabel(111, "人力资源"), type: "1", viewAttr: 3, - rules: "required", + rules: "required" }, colSpan: 1, conditionType: "BROWSER", rules: "required|string", domkey: ["adminUserIds"], fieldcol: 14, - label: "管理员", + label: getLabel(111, "管理员"), labelcol: 6, - viewAttr: 3, + viewAttr: 3 }, { colSpan: 1, conditionType: "TEXTAREA", domkey: ["description"], fieldcol: 14, - label: "备注", + label: getLabel(111, "备注"), labelcol: 6, value: "", - viewAttr: 2, - }, + viewAttr: 2 + } ], - defaultshow: true, - }, + defaultshow: true + } ]; export const decentralizationConditions = [ { @@ -72,22 +75,22 @@ export const decentralizationConditions = [ domkey: ["name"], fieldcol: 14, rules: "required|string", - label: "名称", + label: getLabel(111, "名称"), labelcol: 6, value: "", - viewAttr: 3, + viewAttr: 3 }, { colSpan: 1, conditionType: "TEXTAREA", domkey: ["description"], fieldcol: 14, - label: "备注", + label: getLabel(111, "备注"), labelcol: 6, value: "", - viewAttr: 2, - }, + viewAttr: 2 + } ], - defaultshow: true, - }, + defaultshow: true + } ]; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/editModal.js b/pc4mobx/hrmSalary/pages/taxAgent/editModal.js index 478776d9..9984cb5c 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/editModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/editModal.js @@ -1,6 +1,6 @@ import React from "react"; import { Button } from "antd"; -import { WeaDialog, WeaFormItem, WeaSearchGroup, WeaSteps, WeaTab } from "ecCom"; +import { WeaDialog, WeaFormItem, WeaSearchGroup, WeaSteps, WeaTab, WeaLocaleProvider } from "ecCom"; import { WeaSwitch } from "comsMobx"; import PersonalScope from "./personalScope"; @@ -16,7 +16,7 @@ const left = { const stepWrapper = { padding: "20px 200px" }; - +const getLabel = WeaLocaleProvider.getLabel; const Step = WeaSteps.Step; export default class EditModal extends React.Component { @@ -126,10 +126,10 @@ export default class EditModal extends React.Component { onClick={this.handleSubmit} loading={saveloading}> {btnType === "save" - ? "保存并进入下一步" + ? getLabel(111, "保存并进入下一步") : btnType === "prev" - ? "上一步" - : "保存"} + ? getLabel(111, "上一步") + : getLabel(111, "保存")} )}
    @@ -139,15 +139,15 @@ export default class EditModal extends React.Component { visible={visible} style={{ width: 800, height: 450 }} hasScroll> - {title.indexOf("编辑") >= 0 && ( + {title.indexOf(getLabel(111, "编辑")) >= 0 && ( onChangeTab && onChangeTab(v)} /> )} - {(btnType === "save" || title.indexOf("编辑") < 0) && ( + {(btnType === "save" || title.indexOf(getLabel(111, "编辑")) < 0) && (
    - - + +
    )} diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index 5f320709..8d17fcb1 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -1,13 +1,14 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Button, Col, message, Modal, Row, Switch, Dropdown, Menu } from "antd"; -import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom"; +import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd"; +import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTable, WeaTop } from "ecCom"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import EditModal from "./editModal"; import TipLabel from "../../components/TipLabel"; import { decentralizationConditions, editConditions } from "./editConditions"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer export default class TaxAgent extends React.Component { @@ -16,7 +17,7 @@ export default class TaxAgent extends React.Component { this.state = { name: "", editModalProps: { - title: "新增个税扣缴义务人", + title: getLabel(111, "新增个税扣缴义务人"), visible: false, current: 0, btnType: "save", //save: 添加, edit: 编辑, prev: '上一步' @@ -66,19 +67,19 @@ export default class TaxAgent extends React.Component { taxAgentBaseSave = devolutionStatus => { Modal.confirm({ - title: "信息确认", - content: `确认${!devolutionStatus ? "停用" : "启用"}分权?`, + title: getLabel(111, "信息确认"), + content: `${getLabel(111, "确认")}${!devolutionStatus ? getLabel(111, "停用") : getLabel(111, "启用")}${getLabel(111, "分权")}?`, onOk: () => { const paylaod = { devolutionStatus }; const { taxAgentStore } = this.props; const { taxAgentBaseSave, doInit, pageObj } = taxAgentStore; taxAgentBaseSave(paylaod).then(({ status, errormsg }) => { if (status) { - message.success(`${!devolutionStatus ? "停用" : "启用"}分权成功`); + message.success(`${!devolutionStatus ? getLabel(111, "停用") : getLabel(111, "启用")}${getLabel(111, "分权成功")}`); this.getTaxAgentBaseForm(); doInit({ current: pageObj.current, pageSize: pageObj.pageSize }); } else { - message.error(errormsg || `${!devolutionStatus ? "停用" : "启用"}分权失败`); + message.error(errormsg || `${!devolutionStatus ? getLabel(111, "停用") : getLabel(111, "启用")}${getLabel(111, "分权失败")}`); } }); }, @@ -138,7 +139,7 @@ export default class TaxAgent extends React.Component { editModalProps: { ...this.state.editModalProps, visible: true, - title: editId ? "编辑个税扣缴义务人" : "新增个税扣缴义务人", + title: editId ? getLabel(111, "编辑个税扣缴义务人") : getLabel(111, "新增个税扣缴义务人"), btnType: editId ? "edit" : "save", editId: editId, editType: current ? "set" : editId && !current ? "edit" : "save", @@ -159,7 +160,7 @@ export default class TaxAgent extends React.Component { { editModalProps: { ...this.state.editModalProps, - title: "新增个税扣缴义务人", + title: getLabel(111, "新增个税扣缴义务人"), current: 0, btnType: "save", editId: "", @@ -199,7 +200,7 @@ export default class TaxAgent extends React.Component { } }); if (status) { - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); this.setState({ editModalProps: { ...editModalProps, @@ -210,7 +211,7 @@ export default class TaxAgent extends React.Component { }); doInit({ current: pageObj.current, pageSize: pageObj.pageSize }); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } }); } else if (btnType === "edit") { @@ -228,7 +229,7 @@ export default class TaxAgent extends React.Component { } }); if (status) { - message.success("更新成功"); + message.success(getLabel(111, "更新成功")); if (editType === "edit") { this.closeModal(); } else { @@ -242,7 +243,7 @@ export default class TaxAgent extends React.Component { } doInit({ current: pageObj.current, pageSize: pageObj.pageSize }); } else { - message.error(errormsg || "更新失败"); + message.error(errormsg || getLabel(111, "更新失败")); } }); } @@ -256,15 +257,15 @@ export default class TaxAgent extends React.Component { const { taxAgentStore } = this.props; const { deleteTaxAgent, pageObj, doInit } = taxAgentStore; Modal.confirm({ - title: "信息确认", - content: `确认要删除吗?`, + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), onOk: () => { deleteTaxAgent([agentId]).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); doInit({ current: pageObj.current, pageSize: pageObj.pageSize }); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(111, "删除失败")); } }); } @@ -277,7 +278,7 @@ export default class TaxAgent extends React.Component { taxAgentRangeSync({}).then(({ status, data }) => { this.setState({ syncLoading: false }); if (status) { - message.success(data || "操作成功"); + message.success(data || getLabel(111, "操作成功")); getTaxAgentList(); } }); @@ -312,28 +313,28 @@ export default class TaxAgent extends React.Component { } const btns = [ - , + , this.setState({ name })} onSearch={() => getTaxAgentList({ name, current: 1 })} /> ]; const renderTipsLabel = () => { const tipList = [ - "1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;", - "2、删除个税扣缴义务人需先确认档案里无人员使用该个税扣缴义务人,否则不予删除;", - "3、只有薪酬总管理员能够操作个税扣缴义务人的增减和开启/关闭分权;", - "4、总管理员通过后台设置“薪酬管理权限”权限项进行配置;" + getLabel(111, "1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;"), + getLabel(111, "2、删除个税扣缴义务人需先确认档案里无人员使用该个税扣缴义务人,否则不予删除;"), + getLabel(111, "3、只有薪酬总管理员能够操作个税扣缴义务人的增减和开启/关闭分权;"), + getLabel(111, "4、总管理员通过后台设置“薪酬管理权限”权限项进行配置;") ]; return ; }; const pagination = { total: pageObj.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], onShowSizeChange(current, pageSize) { @@ -347,14 +348,14 @@ export default class TaxAgent extends React.Component { [ ...columns, { - title: "操作", + title: getLabel(111, "操作"), key: "operation", render: (text, record) =>
    this.showEditModal(record.id)}> - 编辑 + {getLabel(111, "编辑")} this.deleteTaxAgent(record.id)}> - 删除 + {getLabel(111, "删除")} }> - +
    @@ -400,7 +401,7 @@ export default class TaxAgent extends React.Component { return (
    } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 buttons={btns} @@ -411,9 +412,9 @@ export default class TaxAgent extends React.Component {
    {permission.isChief && - + -
    个税扣缴义务人
    +
    {getLabel(111, "个税扣缴义务人")}
    {/* 总管理员开启新增功能 */} {permission.isChief && this.showEditModal()} />}
    diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index 767822a1..6803860c 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -6,12 +6,13 @@ */ import React, { Component } from "react"; import { message, Modal } from "antd"; +import {WeaLocaleProvider} from "ecCom"; import { inject, observer } from "mobx-react"; import SlideTaxagentUser from "./slideTaxagentUser"; import "./index.less"; const personScopeWarrper = {}; - +const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore", "ledgerStore") @observer export default class PersonalScope extends Component { @@ -108,13 +109,13 @@ export default class PersonalScope extends Component { const { taxAgentRangeDelete } = this.props.taxAgentStore; const { pageObj } = this.state; Modal.confirm({ - title: "信息确认", - content: `确认删除该条数据吗?`, + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认删除吗?"), onOk: () => { taxAgentRangeDelete(ids).then(({ status, errorMsg }) => { if (status) { this.tagAgentRef.onSelectChange([]); - message.success("删除成功"); + message.success(getLabel(111, "删除成功")); tab == "1" ? this.getTaxAgentRangeListInclude({ current: pageObj.current, @@ -125,7 +126,7 @@ export default class PersonalScope extends Component { pageSize: pageObj.pageSize }); } else { - message.error(errorMsg || "删除失败"); + message.error(errorMsg || getLabel(111, "删除失败")); } }); }, @@ -145,7 +146,7 @@ export default class PersonalScope extends Component { this.setState({ submitLoading: false }); if (status) { this.tagAgentRef.closeModal(); - message.success("新增成功"); + message.success(getLabel(111, "新增成功")); includeType == "1" ? this.getTaxAgentRangeListInclude({ current: pageObj.current, @@ -156,7 +157,7 @@ export default class PersonalScope extends Component { pageSize: pageObj.pageSize }); } else { - message.error(errormsg || "新增失败"); + message.error(errormsg || getLabel(111, "新增失败")); } } ); diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index b7f3254e..d21b17ab 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -1,12 +1,12 @@ import React from "react"; import { Button, message } from "antd"; -import { WeaInputSearch, WeaTable } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom"; import AddTaxAgentModal from "./addTaxAgentModal"; import ImportModal from "../../components/importModal"; import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent"; import { importEmployColumns } from "./columns"; - +const getLabel = WeaLocaleProvider.getLabel; export default class SlideTaxagentUser extends React.Component { constructor(props) { super(props); @@ -44,7 +44,7 @@ export default class SlideTaxagentUser extends React.Component { const { onDeleteTaxAgent } = this.props; const { includeType } = this.state; if (this.state.selectedRowKeys.length == 0) { - message.warning("未选择条目"); + message.warning(getLabel(111, "未选择条目")); return; } onDeleteTaxAgent({ ids: this.state.selectedRowKeys, tab: includeType }); @@ -132,7 +132,7 @@ export default class SlideTaxagentUser extends React.Component { }; const pagination = { total: pageObj.total, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`, pageSizeOptions: ["10", "20", "50", "100"], showQuickJumper: true, showSizeChanger: true, @@ -179,7 +179,7 @@ export default class SlideTaxagentUser extends React.Component { onClick={() => { this.handleTabClick(1); }}> - 人员范围 + {getLabel(111, "人员范围")} | { this.handleTabClick(0); }}> - 从范围中排除 + {getLabel(111, "从范围中排除")}
    @@ -208,7 +208,7 @@ export default class SlideTaxagentUser extends React.Component { onClick={() => { this.setState({ importParams: { ...importParams, visible: true, step: 0 } }); }} - > + > }
    + > + >
    } diff --git a/pc4mobx/hrmSalary/pages/taxRate/columns.js b/pc4mobx/hrmSalary/pages/taxRate/columns.js index 46edcae7..ac8a6761 100644 --- a/pc4mobx/hrmSalary/pages/taxRate/columns.js +++ b/pc4mobx/hrmSalary/pages/taxRate/columns.js @@ -1,114 +1,115 @@ -import {EditableCell} from '../../components/EditTable' +import { WeaLocaleProvider } from "ecCom"; +const getLabel = WeaLocaleProvider.getLabel; export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "员工状态", - dataIndex: 'title', - key: 'title', - }, - { - title: "基本工资", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: getLabel(111, "姓名"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "个税扣缴义务人"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "部门"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "手机号"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "员工状态"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "基本工资"), + dataIndex: "title", + key: "title" + }, + { + title: getLabel(111, "操作"), + dataIndex: "title", + key: "title" + } +]; export const slideColumns = [ - { - title: '序号', - dataIndex: 'indexNum', - key: 'indexNum', - popover: true - }, - { - title: '收入', - children: [ - { - title: '下限(不含)', - dataIndex: 'incomeLowerLimit', - key: 'incomeLowerLimit', - editable: true - }, - { - title: '上限(含)', - dataIndex: 'incomeUpperLimit', - key: 'incomeUpperLimit', - editable: true - }, - ], - }, - { - title: '免税标准', - children: [ - { - title: '固定值', - dataIndex: 'dutyFreeValue', - key: 'dutyFreeValue', - editable: true - }, - { - title: '比例', - dataIndex: 'dutyFreeRate', - key: 'dutyFreeRate', - editable: true - }, - ], - }, - { - title: '应纳税所得额', - children: [ - { - title: '下限(不含)', - dataIndex: 'taxableIncomeLl', - key: 'taxableIncomeLl', - editable: true - }, - { - title: '上限(含)', - dataIndex: 'taxableIncomeUl', - key: 'taxableIncomeUl', - editable: true - }, - ], - }, - { - title: '税率', - dataIndex: 'taxRate', - key: 'taxRate', - editable: true - }, - { - title: '速算扣除', - dataIndex: 'taxDeduction', - key: 'taxDeduction', - editable: true - } - ]; + { + title: getLabel(111, "序号"), + dataIndex: "indexNum", + key: "indexNum", + popover: true + }, + { + title: getLabel(111, "收入"), + children: [ + { + title: getLabel(111, "下限(不含)"), + dataIndex: "incomeLowerLimit", + key: "incomeLowerLimit", + editable: true + }, + { + title: getLabel(111, "上限(含)"), + dataIndex: "incomeUpperLimit", + key: "incomeUpperLimit", + editable: true + } + ] + }, + { + title: getLabel(111, "免税标准"), + children: [ + { + title: getLabel(111, "固定值"), + dataIndex: "dutyFreeValue", + key: "dutyFreeValue", + editable: true + }, + { + title: getLabel(111, "比例"), + dataIndex: "dutyFreeRate", + key: "dutyFreeRate", + editable: true + } + ] + }, + { + title: getLabel(111, "应纳税所得额"), + children: [ + { + title: getLabel(111, "下限(不含)"), + dataIndex: "taxableIncomeLl", + key: "taxableIncomeLl", + editable: true + }, + { + title: getLabel(111, "上限(含)"), + dataIndex: "taxableIncomeUl", + key: "taxableIncomeUl", + editable: true + } + ] + }, + { + title: getLabel(111, "税率"), + dataIndex: "taxRate", + key: "taxRate", + editable: true + }, + { + title: getLabel(111, "速算扣除"), + dataIndex: "taxDeduction", + key: "taxDeduction", + editable: true + } +]; export const dataSource = []; diff --git a/pc4mobx/hrmSalary/pages/taxRate/editSlideContent.js b/pc4mobx/hrmSalary/pages/taxRate/editSlideContent.js index 34b49e31..3ae260e1 100644 --- a/pc4mobx/hrmSalary/pages/taxRate/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/taxRate/editSlideContent.js @@ -1,95 +1,105 @@ -import React from 'react'; -import { Row, Col, Table } from "antd" -import { inject, observer } from 'mobx-react'; -import { WeaInput, WeaTextarea, WeaSearchGroup } from "ecCom"; -import { slideColumns} from './columns'; -import EditableTable from '../../components/EditTable' -import RequiredLabelTip from '../../components/requiredLabelTip' +import React from "react"; +import { Col, Row } from "antd"; +import { inject, observer } from "mobx-react"; +import { WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { slideColumns } from "./columns"; +import EditableTable from "../../components/EditTable"; +import RequiredLabelTip from "../../components/requiredLabelTip"; let emptyItem = { - incomeLowerLimit: "0.00", - incomeUpperLimit: "0.00", - dutyFreeValue: "0.00", - dutyFreeRate: "0.00", - taxableIncomeLl: "0.00", - taxableIncomeUl: "0.00", - taxRate: "0.00", - taxDeduction: "0.00" -} - -@inject('taxRateStore') + incomeLowerLimit: "0.00", + incomeUpperLimit: "0.00", + dutyFreeValue: "0.00", + dutyFreeRate: "0.00", + taxableIncomeLl: "0.00", + taxableIncomeUl: "0.00", + taxRate: "0.00", + taxDeduction: "0.00" +}; +const getLabel = WeaLocaleProvider.getLabel; +@inject("taxRateStore") @observer export default class EditSlideContent extends React.Component { - componentWillMount() { // 初始化渲染页面 - this.state = { - editable: this.props.editable === undefined ? "true": this.props.editable - } - } + componentWillMount() { // 初始化渲染页面 + this.state = { + editable: this.props.editable === undefined ? "true" : this.props.editable + }; + } - addItem() { - const { taxRateStore: {setDataSource}} = this.props; - let dataSource = [...this.props.taxRateStore.dataSource]; - let indexNum = 1; - if(dataSource.length > 0) { - indexNum = dataSource[dataSource.length - 1].indexNum + 1 - } - let item = {...emptyItem} - item.indexNum = indexNum - dataSource.push(item); - setDataSource(dataSource) + addItem() { + const { taxRateStore: { setDataSource } } = this.props; + let dataSource = [...this.props.taxRateStore.dataSource]; + let indexNum = 1; + if (dataSource.length > 0) { + indexNum = dataSource[dataSource.length - 1].indexNum + 1; } - render() { - const { taxRateStore: {dataSource, nameValue, remarkValue, setNameValue, setRemarkValue, setDataSource}} = this.props; - return ( -
    - - - -
    名称:
    - - - { - setNameValue(value) - }} - viewAttr={this.props.editable ? 2: 1} - /> - -
    + let item = { ...emptyItem }; + item.indexNum = indexNum; + dataSource.push(item); + setDataSource(dataSource); + } - - -
    备注:
    - - - { - setRemarkValue(value) - }} - viewAttr={this.props.editable ? 2: 1} - /> - -
    -
    - - { -this.addItem() -}} - onDataSourceChange={setDataSource} - editable={this.state.editable} - /> - -
    - ) - } -} \ No newline at end of file + render() { + const { + taxRateStore: { + dataSource, + nameValue, + remarkValue, + setNameValue, + setRemarkValue, + setDataSource + } + } = this.props; + return ( +
    + + + +
    {getLabel(111, "名称")}:
    + + + { + setNameValue(value); + }} + viewAttr={this.props.editable ? 2 : 1} + /> + +
    + + + +
    {getLabel(111, "备注")}:
    + + + { + setRemarkValue(value); + }} + viewAttr={this.props.editable ? 2 : 1} + /> + +
    +
    + + { + this.addItem(); + }} + onDataSourceChange={setDataSource} + editable={this.state.editable} + /> + +
    + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/taxRate/index.js b/pc4mobx/hrmSalary/pages/taxRate/index.js index 8a377e60..f7f6e5a6 100644 --- a/pc4mobx/hrmSalary/pages/taxRate/index.js +++ b/pc4mobx/hrmSalary/pages/taxRate/index.js @@ -1,17 +1,15 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; - import { Button, DatePicker, Modal } from "antd"; - -import { WeaInputSearch, WeaSlideModal, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaSlideModal, WeaTop, WeaLocaleProvider } from "ecCom"; import { WeaTableNew } from "comsMobx"; import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from "../../components/customTab"; import SlideModalTitle from "../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; - +const getLabel = WeaLocaleProvider.getLabel; const WeaTable = WeaTableNew.WeaTable; const { MonthPicker } = DatePicker; @@ -83,8 +81,8 @@ export default class TaxRate extends React.Component { break; case "1": // 删除 Modal.confirm({ - title: "信息确认", - content: "确定删除吗", + title: getLabel(111, "信息确认"), + content: getLabel(111, "确定删除吗?"), onOk() { doDelete([record.id]); }, @@ -118,22 +116,22 @@ export default class TaxRate extends React.Component { { key: "BTN_DEL", icon: , - content: "批量删除", + content: getLabel(111, "批量删除"), disable: selectedRowKeys.length === 0, // 没有选中禁用 onClick: doBatchDelete } ]; const collectParams = { // 收藏功能配置 - favname: "个税税率表", + favname: getLabel(111, "个税税率表"), favouritetype: 1, objid: 0, link: "wui/index.html#/ns_demo03/index", importantlevel: 1 }; const adBtn = [ // 高级搜索内部按钮 - , - , - + , + , + ]; const topTab = []; @@ -142,10 +140,10 @@ export default class TaxRate extends React.Component { return
    + }}>{getLabel(111, "新建")} {" "} { doSearch({ name }); }} @@ -158,7 +156,7 @@ export default class TaxRate extends React.Component { return (
    } // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 @@ -195,8 +193,8 @@ export default class TaxRate extends React.Component { measure={"%"} title={ { this.state.currentOperate == "add" ? doSave() : doUpdate(); }}