diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 85805d5c..d7f1fb5b 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -278,5 +278,11 @@ export const getCompareSobConfig = params => { export const updateSobConfig = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params); }; - - +//薪资核算-计算个税 +export const acctresultCalcTax = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTax", params); +}; +//薪资核算-获取个税计算反馈 +export const calcTaxFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTaxFeedback", params); +}; diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index 9c9d625e..59f898d4 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -25,6 +25,10 @@ export const deleteLedger = params => { export const getLedgerBasicForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/salarysob/basic/getForm", "get", params); }; +//薪资帐套基本信息工资类型接口 +export const getIncomeCategoryList = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salarysob/incomeCategoryList", "get", params); +}; //保存薪资帐套基本信息 export const saveLedgerBasic = params => { @@ -143,6 +147,10 @@ export const getBackitemForm = params => { export const taxreportruleGetForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params); }; +//薪资账套下的个税字段对应-个税字段对应 +export const taxruleGetForm = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxrule/getForm", "GET", params); +}; //薪资账套下的个税申报-累计字段对应 export const addupruleGetForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/salarysob/adduprule/getForm", "GET", params); @@ -151,6 +159,10 @@ export const addupruleGetForm = params => { export const taxreportruleSave = params => { return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params); }; +//保存薪资账套下的个税字段对应规则 +export const taxruleSave = params => { + return postFetch("/api/bs/hrmsalary/salarysob/taxrule/save", params); +}; //保存薪资账套下的累计字段对应关系 export const addupruleSave = params => { return postFetch("/api/bs/hrmsalary/salarysob/adduprule/save", params); 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/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 0d1c87fc..cef79e68 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -9,7 +9,7 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom"; import { Button, Dropdown, Menu, message, Modal } from "antd"; import { inject, observer } from "mobx-react"; import Layout from "./layout"; -import { acctresultAccounting, getCalculateProgress, getExportField } from "../../../apis/calculate"; +import * as API from "../../../apis/calculate"; import AdvanceInputBtn from "./components/advanceInputBtn"; import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm"; import SalaryEditCalc from "./components/salaryEditCalc"; @@ -27,7 +27,7 @@ class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "person", progressVisible: false, progress: 0, + selectedKey: "person", progressVisible: false, progress: 0, loading: { calcTax: false, feedback: false }, customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] }, salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" }, accountExceptInfo: "" //核算报错信息, @@ -60,11 +60,11 @@ class Index extends Component { this.setState({ progress: 0 }); let payload = { salaryAcctRecordId }; if (key === "calc_selected") payload = _.assign(payload, { ids: selectedRowKeys }); - acctresultAccounting(payload).then(() => { + API.acctresultAccounting(payload).then(() => { this.setState({ progressVisible: true }); if (this.timer) clearInterval(this.timer); this.timer = setInterval(() => { - getCalculateProgress(salaryAcctRecordId).then(({ data }) => { + API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => { let progress = data.progress; if (progress === 1 && this.timer) { clearInterval(this.timer); @@ -101,7 +101,7 @@ class Index extends Component { window.open(`${window.ecologyContentPath || ""}${url}`, "_blank"); break; case "export_custom": - getExportField({ salaryAcctRecordId }).then(({ status, data }) => { + API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => { if (status) { const { checkItems, itemsByGroup } = data; this.setState({ @@ -129,8 +129,34 @@ class Index extends Component { break; } }; + acctresultCalcTax = () => { + const { routeParams: { salaryAcctRecordId } } = this.props; + this.setState({ loading: { ...this.state.loading, calcTax: true } }); + API.acctresultCalcTax({ salaryAcctRecordId }).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, calcTax: false } }); + if (status) { + message.success(getLabel(111, "操作成功!")); + this.calc.onAdSearch(false); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: { ...this.state.loading, calcTax: false } })); + }; + calcTaxFeedback = () => { + const { routeParams: { salaryAcctRecordId } } = this.props; + this.setState({ loading: { ...this.state.loading, feedback: true } }); + API.calcTaxFeedback({ salaryAcctRecordId }).then(({ status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, feedback: false } }); + if (status) { + message.success(getLabel(111, "操作成功!")); + this.calc.onAdSearch(false); + } else { + message.error(errormsg); + } + }).catch(() => this.setState({ loading: { ...this.state.loading, feedback: false } })); + }; renderReqBtns = () => { - const { selectedKey, accountExceptInfo } = this.state; + const { selectedKey, accountExceptInfo, loading } = this.state; let reqBtns = []; switch (selectedKey) { case "calc": @@ -151,6 +177,10 @@ class Index extends Component { this.doCacl("ALL")} overlay={menu} type="primary"> {getLabel(543545, "核算所有人")} , + , + , , this.calc.openAdvanceSearch()} onAdvanceSearch={() => this.calc.onAdSearch(false)}/> diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js new file mode 100644 index 00000000..468288c0 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js @@ -0,0 +1,147 @@ +/* + * + * 个税字段对应 + * @Author: 黎永顺 + * @Date: 2024/6/17 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom"; +import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver"; +import { taxruleGetForm } from "../../../apis/ledger"; +import LedgerFieldsTable from "./ledgerFieldsTable"; + +const { getLabel } = WeaLocaleProvider; + +class IncomeTaxFields extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "", tabs: [], + incomeTaxFields: [], keywords: "" + }; + } + + componentDidMount() { + this.taxruleGetForm(); + } + + taxruleGetForm = () => { + const { editId, saveSalarySobId } = this.props; + taxruleGetForm({ id: editId || saveSalarySobId }).then(({ status, data }) => { + if (status && !_.isEmpty(data)) { + this.setState({ + tabs: _.map(data, it => ({ viewcondition: it.incomeCategoryId, title: it.incomeCategoryName })), + selectedKey: _.take(data)[0].incomeCategoryId, + incomeTaxFields: _.map(data, it => ({ + ...it, taxReportRules: _.map(it.taxRules, o => ({ + ...o, canEdit: o.canEdit, id: "", reportColumnDataIndex: o.taxIndex, reportColumnName: o.name, + salaryItem: [{ id: o.salaryItemId, name: o.salaryItemName }] + })) + })) + }, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey)); + } + }); + }; + handleChangeSwitch = (visible, id) => { + const { incomeTaxFields, selectedKey } = this.state; + this.setState({ + incomeTaxFields: _.map(incomeTaxFields, it => { + if (it.incomeCategoryId === selectedKey) { + return { + ...it, + taxReportRules: _.map(it.taxReportRules, child => { + if (child.id === id) { + return { ...child, visible }; + } + return { ...child, visible: false }; + }) + }; + } + return { ...it }; + }) + }, () => this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey)); + }; + handleChangeIncomeFieldsItem = (salaryItem, recordRuleId) => { + const { incomeTaxFields, selectedKey } = this.state; + this.setState({ + incomeTaxFields: _.map(incomeTaxFields, it => { + if (it.incomeCategoryId === selectedKey) { + return { + ...it, + taxReportRules: _.map(it.taxReportRules, child => { + if (child.id === recordRuleId) { + return { ...child, visible: false, salaryItem }; + } + return { ...child, visible: false }; + }) + }; + } + return { ...it }; + }) + }, () => { + this.props.onSetTaxreportrule(this.state.incomeTaxFields, this.state.selectedKey); + }); + }; + + render() { + const { editId, saveSalarySobId } = this.props; + const { selectedKey, tabs, incomeTaxFields, keywords } = this.state; + const list = _.map(incomeTaxFields, it => { + if (it.incomeCategoryId === selectedKey) { + return { + ...it, + taxReportRules: _.filter(it.taxReportRules, item => item.reportColumnName.indexOf(keywords) !== -1) + }; + } + return { ...it }; + }); + const dataSource = _.takeWhile(list, it => it.incomeCategoryId === selectedKey); + return ( + + this.setState({ keywords: val })} + /> + + } + > + + {getLabel(111, "个税申报表字段")} + {/**/} + , + width: "50%", + dataIndex: "reportColumnName" + }, + { + title: getLabel(111, "对应本账套薪资项目"), + width: "50%", + dataIndex: "salaryItem", + render: (_, record) => ( + + ) + } + ]} + dataSource={dataSource} + /> + + ); + } +} + +export default IncomeTaxFields; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less index bcdacf71..e5971341 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/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js index ad86439e..45022954 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js @@ -5,11 +5,11 @@ * 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 { baseSettingFormItem } from "../config"; -import { getLedgerBasicForm } from "../../../apis/ledger"; +import { getIncomeCategoryList, getLedgerBasicForm } from "../../../apis/ledger"; import { generateBasicInfo, getAddMonthYearMonth, @@ -18,10 +18,12 @@ import { getSubtractMonthYearMonth, prefixAddZero } from "../../../util/date"; -import { commonEnumList } from "../../../apis/ruleconfig"; import moment from "moment"; +import cs from "classnames"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + @inject("taxAgentStore") @observer class LedgerBaseSetting extends Component { @@ -124,10 +126,7 @@ class LedgerBaseSetting extends Component { }); }; commonEenumList = () => { - const payload = { - enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum" - }; - commonEnumList(payload).then(({ status, data }) => { + getIncomeCategoryList().then(({ status, data }) => { if (status) { const { baseForm } = this.state; this.setState({ @@ -135,7 +134,16 @@ class LedgerBaseSetting extends Component { if (it.key === "taxableItems") { return { ...it, - options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel })) + options: _.map(data, it => ({ + key: it.value.toString(), + showname:
+ {it.defaultLabel} + + {it.reportTypeName} + +
+ })) }; } return { ...it }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 1395aed8..6f2c8379 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -8,20 +8,23 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; 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 IncomeTaxFields from "./incomeTaxFields"; +import IncomeTaxFieldsCorresponding from "./incomeTaxFieldsCorresponding"; import CumulativeFields from "./cumulativeFields"; +import WeaTopTitle from "../../../components/custom-title/weaTopTitle"; +import WeaReqTitle from "../../../components/custom-title/weaReqTitle"; import { addupruleSave, saveAdjustmentRule, saveLedgerBasic, saveLedgerItem, - taxreportruleSave + taxreportruleSave, + taxruleSave } from "../../../apis/ledger"; import "./index.less"; @@ -39,6 +42,7 @@ class LedgerSlide extends Component { baseSettingInfo: {}, adjustRules: [], empFields: [], itemGroups: [], + taxruleFields: [], taxruleKeys: "", //个税字段对应 incomeTaxFields: [], incomeTaxKeys: "", //个税申报字段对应 addupruleFields: [], addupruleKeys: "", //累计字段对应 saveSalarySobId: "", @@ -147,6 +151,45 @@ class LedgerSlide extends Component { } }).catch(() => this.setState({ loading: false })); }; + /* + * Author: 黎永顺 + * Description:个税字段对应-保存 + * Params: + * Date: 2023/8/16 + */ + taxRuleSave = () => { + const { editId } = this.props; + const { taxruleKeys, taxruleFields, saveSalarySobId } = this.state; + const payload = { + salarySobId: editId || saveSalarySobId, + incomeCategoryParams: _.map(taxruleFields, it => { + if (it.incomeCategoryId === taxruleKeys) { + return { + incomeCategory: it.incomeCategoryId, + taxRuleParams: _.map(it.taxReportRules, child => { + return { + taxIndex: child.reportColumnDataIndex, + salaryItemId: _.map(child.salaryItem, o => o.id).join(",") + }; + }) + }; + } + return { + incomeCategory: it.incomeCategoryId, + taxRuleParams: [] + }; + }) + }; + this.setState({ loading: true }); + taxruleSave(payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }).catch(() => this.setState({ loading: false })); + }; /* * Author: 黎永顺 * Description:个税申报字段对应-保存 @@ -154,33 +197,29 @@ class LedgerSlide extends Component { * Date: 2023/8/16 */ taxreportruleSave = () => { - const { taxableItems, incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state; const { editId } = this.props; - if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) { - this.saveLedgerAdjustRule(); - } else { - const payload = { - salarySobId: editId || saveSalarySobId, - incomeCategoryParams: _.map(incomeTaxFields, it => { - if (it.incomeCategoryId === incomeTaxKeys) { - return { - incomeCategory: it.incomeCategoryId, - taxReportRuleParams: _.map(it.taxReportRules, child => { - return { - reportColumnDataIndex: child.reportColumnDataIndex, - salaryItemId: _.map(child.salaryItem, o => o.id).join(",") - }; - }) - }; - } + const { incomeTaxKeys, incomeTaxFields, saveSalarySobId } = this.state; + const payload = { + salarySobId: editId || saveSalarySobId, + incomeCategoryParams: _.map(incomeTaxFields, it => { + if (it.incomeCategoryId === incomeTaxKeys) { return { incomeCategory: it.incomeCategoryId, - taxReportRuleParams: [] + taxReportRuleParams: _.map(it.taxReportRules, child => { + return { + reportColumnDataIndex: child.reportColumnDataIndex, + salaryItemId: _.map(child.salaryItem, o => o.id).join(",") + }; + }) }; - }) - }; - this.saveTaxreportrule(payload); - } + } + return { + incomeCategory: it.incomeCategoryId, + taxReportRuleParams: [] + }; + }) + }; + this.saveTaxreportrule(payload); }; saveTaxreportrule = (payload) => { this.setState({ loading: true }); @@ -200,7 +239,10 @@ class LedgerSlide extends Component { * Date: 2023/8/17 */ addupruleSave = () => { - const { taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields, addupruleKeys, saveSalarySobId } = this.state; + const { + taxableItems, incomeTaxFields, incomeTaxKeys, addupruleFields, + addupruleKeys, saveSalarySobId + } = this.state; const { editId } = this.props; if ((!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489")) { const payload = { @@ -256,21 +298,14 @@ 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: 薪资项目保存数据 @@ -280,179 +315,132 @@ class LedgerSlide extends Component { handleSaveSalaryItemParams = (empFields, itemGroups) => { this.setState({ empFields, itemGroups }); }; - renderChildren = () => { - const { editId } = this.props; - const { current, saveSalarySobId, taxableItems } = this.state; - let CurrentDom = null; - switch (current) { - case 0: - CurrentDom = this.setState({ taxableItems: val })} - />; - break; - case 1: - CurrentDom = ; - break; - case 2: - CurrentDom = ; - break; - case 3: - CurrentDom = ; - break; - case 4: - CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ? - this.setState({ - incomeTaxFields, - incomeTaxKeys: selectedKey - })}/> : - this.setState({ - addupruleFields, - addupruleKeys: selectedKey - })}/>; - break; - case 5: - CurrentDom = (!editId && taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") ? - this.setState({ adjustRules })}/> : - this.setState({ - incomeTaxFields, - incomeTaxKeys: selectedKey - })}/>; - break; - case 6: - CurrentDom = - this.setState({ adjustRules })}/>; - break; - default: - CurrentDom = null; - break; - } - return CurrentDom; - }; - renderCustomOperate = () => { - const { taxAgentStore: { showOperateBtn }, editId } = this.props; - const { current, loading, taxableItems } = 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; - case 5: - CurrentDom = !editId ? - [ - , - , - - ] : [ - - ]; - break; - case 6: - CurrentDom = !editId ? - [ - , - - ] : [ - - ]; - break; - default: - break; - } - } - return CurrentDom; - }; render() { + const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props; + const { current, taxableItems, saveSalarySobId, loading } = this.state; let tabs = [ - { key: 0, title: getLabel(82751, "基础设置") }, - { key: 1, title: getLabel(543467, "关联人员") }, - { key: 2, title: getLabel(542362, "薪资项目") }, - { key: 3, title: getLabel(543468, "回算薪资项目") }, - { key: 4, title: getLabel(111, "累计字段对应") }, - { key: 5, title: getLabel(111, "个税申报字段对应") }, - { key: 6, title: getLabel(543469, "调薪计薪规则") } + { + 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(111, "累计字段对应"), + createBtns: [ + , + , + + ], + editBtns: [], + children: this.setState({ + addupruleFields, addupruleKeys: selectedKey + })}/> + }, + { + key: 5, title: getLabel(111, "个税字段对应"), + createBtns: [ + , + , + + ], + editBtns: [], + children: this.setState({ + taxruleFields, taxruleKeys: selectedKey + })}/> + }, + { + key: 6, title: getLabel(111, "个税申报字段对应"), + createBtns: [ + , + , + + ], + editBtns: [], + children: this.setState({ + incomeTaxFields, + incomeTaxKeys: selectedKey + })}/> + }, + { + key: 7, title: getLabel(543469, "调薪计薪规则"), + createBtns: [ + , + + ], + editBtns: [ + + ], + children: this.setState({ adjustRules })}/> + } ]; - const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props; - const { current, taxableItems } = this.state; - (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && (tabs = _.filter(tabs, o => o.key !== 4)); + (taxableItems && taxableItems.toString() !== "1" && taxableItems.toString() !== "489") && + (tabs = _.map(_.filter(tabs, o => o.key !== 4), (k, j) => ({ ...k, key: j }))); 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={
@@ -486,9 +466,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%; diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index 4ce6ef7a..6296eac4 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -83,3 +83,27 @@ } +//薪资账套-工资类型下拉选项样式自定义 +.reportTypeName-box { + display: flex; + align-items: center; + justify-content: space-between; + + .reportTypeName { + display: flex; + padding: 0 8px; + align-items: center; + color: #ffcd50; + border: 1px solid #ffde8a; + background-color: #fff5db; + border-radius: 2px; + height: 24px; + } + + .danger { + color: #ff666a !important; + border: 1px solid #ffc1c3 !important; + background-color: #ffdfe0 !important; + } +} +