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, "至")}