From add6a70abd2da601f77535adefcac3dcdbc3e300 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 Jun 2024 16:17:16 +0800 Subject: [PATCH] hotfix/2.14.2.2406.02 --- .../custom-title/weaReqTitle/index.js | 17 ++ .../custom-title/weaTopTitle/index.js | 15 ++ .../importDialog/components/impStep2.js | 10 +- .../pages/ledgerPage/components/index.less | 14 +- .../ledgerPage/components/ledgerSlide.js | 221 +++++++----------- pc4mobx/hrmSalary/pages/ledgerPage/index.less | 10 - 6 files changed, 139 insertions(+), 148 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js create mode 100644 pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js diff --git a/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js b/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js new file mode 100644 index 00000000..69766076 --- /dev/null +++ b/pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js @@ -0,0 +1,17 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( + } iconBgcolor="#F14A2D" + showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props} + /> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js b/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js new file mode 100644 index 00000000..d265c8eb --- /dev/null +++ b/pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js @@ -0,0 +1,15 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTop } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( + } + iconBgcolor="#F14A2D" {...this.props}/> + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js index 91f3e690..0afc13f4 100644 --- a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js @@ -5,9 +5,11 @@ * Date: 2023/9/5 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import { postFetch } from "../../../util/request"; +const { getLabel } = WeaLocaleProvider; + class ImpStep2 extends Component { constructor(props) { super(props); @@ -41,9 +43,15 @@ class ImpStep2 extends Component { render() { const { dataSource, columns, loading } = this.state; const { scrollHeight } = this.props; + const pagination = { + showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + total: dataSource.length, + showSizeChanger: true + }; return ( ); } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less index 27a9ee0a..ba7c1af7 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less @@ -9,7 +9,19 @@ } } -.ledgerSlideContent { +.ledgerSlideLayout { + .wea-new-top { + .ant-col-10 { + padding-right: 45px !important; + } + } + + .wea-new-top-req-wapper .wea-new-top-req-title > div:last-child { + right: 45px !important; + } + + .ledgerSlideContent { + } } .copyWrapper { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 5692c526..d7229b5d 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -6,25 +6,20 @@ */ 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"; import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel"; import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules"; import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem"; import LedgerSalaryItem from "./ledgerSalaryItem"; +import WeaTopTitle from "../../../components/custom-title/weaTopTitle"; +import WeaReqTitle from "../../../components/custom-title/weaReqTitle"; import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; const Step = WeaSteps.Step; -const tabs = [ - { key: 0, title: "基础设置" }, - { key: 1, title: "关联人员" }, - { key: 2, title: "薪资项目" }, - { key: 3, title: "回算薪资项目" }, - { key: 4, title: "调薪计薪规则" } -]; @inject("taxAgentStore", "ledgerStore") @observer @@ -32,12 +27,8 @@ class LedgerSlide extends Component { constructor(props) { super(props); this.state = { - current: 0, - loading: false, - baseSettingInfo: {}, - adjustRules: [], - empFields: [], itemGroups: [], - saveSalarySobId: "" + current: 0, loading: false, baseSettingInfo: {}, adjustRules: [], + empFields: [], itemGroups: [], saveSalarySobId: "" }; } @@ -142,128 +133,96 @@ class LedgerSlide extends Component { } }).catch(() => this.setState({ loading: false })); }; - handleChangeSlideTab = (current) => { - this.setState({ current: Number(current) }); - }; - handleClose = () => { - this.setState({ current: 0 }, () => this.props.onCancel()); - }; + handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel()); /* * Author: 黎永顺 * Description: 基础信息字段切换 * Params: * Date: 2022/12/9 */ - handleChangeSaveParams = (baseSettingInfo) => { - this.setState({ baseSettingInfo }); - }; + handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo }); /* * Author: 黎永顺 * Description: 薪资项目保存数据 * Params: * Date: 2022/12/14 */ - handleSaveSalaryItemParams = (empFields, itemGroups) => { - this.setState({ empFields, itemGroups }); - }; - renderChildren = () => { - const { current, saveSalarySobId } = this.state; - let CurrentDom = null; - switch (current) { - case 0: - CurrentDom = ; - break; - case 1: - CurrentDom = ; - break; - case 2: - CurrentDom = ; - break; - case 3: - CurrentDom = ; - break; - case 4: - CurrentDom = - this.setState({ adjustRules })}/>; - break; - default: - CurrentDom = null; - break; - } - return CurrentDom; - }; - renderCustomOperate = () => { - const { taxAgentStore: { showOperateBtn }, editId } = this.props; - const { current, loading } = this.state; - let CurrentDom = []; - //管理员操作权限 - if (showOperateBtn) { - switch (current) { - case 0: - CurrentDom = [ - - ]; - break; - case 1: - CurrentDom = !editId ? [ - , - - ] : []; - break; - case 2: - CurrentDom = !editId ? - [ - , - , - - ] : [ - - ]; - break; - case 3: - CurrentDom = !editId ? - [ - , - , - - ] : []; - break; - case 4: - CurrentDom = !editId ? - [ - , - - ] : [ - - ]; - break; - default: - break; - } - } - return CurrentDom; - }; + handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups }); render() { - const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props; - const { current } = this.state; + const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props; + const { current, saveSalarySobId, loading } = this.state; + let tabs = [ + { + key: 0, title: getLabel(82751, "基础设置"), + createBtns: [ + + ], + editBtns: [ + + ], + children: this.setState({ taxableItems: val })} + /> + }, + { + key: 1, title: getLabel(543467, "关联人员"), + createBtns: [ + , + + ], + editBtns: [], + children: + }, + { + key: 2, title: getLabel(542362, "薪资项目"), + createBtns: [ + , + , + + ], + editBtns: [ + + ], + children: + }, + { + key: 3, title: getLabel(543468, "回算薪资项目"), + createBtns: [ + , + , + + ], + editBtns: [], + children: + }, + { + key: 4, title: getLabel(543469, "调薪计薪规则"), + createBtns: [ + , + + ], + editBtns: [ + + ], + children: this.setState({ adjustRules })}/> + } + ]; return ( { - }} - selectedTab={current} - customOperate={this.renderCustomOperate()} - subItemChange={this.handleChangeSlideTab} - /> + !editId ? current === o.key).createBtns}/> : + current === o.key).editBtns : []} + tabDatas={tabs} selectedKey={String(current)} + onChange={cur => this.setState({ current: parseInt(cur) })}/> } content={
@@ -297,9 +248,7 @@ class LedgerSlide extends Component { } } - { - this.renderChildren() - } + {_.find(tabs, o => current === o.key).children}
} onClose={this.handleClose} diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/index.less index 2fc10db7..182042bf 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/index.less +++ b/pc4mobx/hrmSalary/pages/ledgerPage/index.less @@ -1,13 +1,3 @@ -.ledgerOuter { - .wea-new-top { - .ant-col-10 { - & > span:nth-child(2) { - margin-top: -6px; - } - } - } -} - .ledgerWrapper { height: 100%;