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} />