From f4cbacd5917f3011c270dd520ebbdcd6b2536470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 14 Jun 2024 16:33:26 +0800 Subject: [PATCH 01/47] hotfix/2.14.2.2406.02 --- .../components/salaryDetails.js | 4 ++-- pc4mobx/hrmSalary/pages/salaryItem/options.js | 10 ++++++++++ .../components/welfarePlanEditSlide/planSetTable.js | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 66538450..9d8d2816 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -37,7 +37,7 @@ class SalaryDetails extends Component { componentWillReceiveProps(nextProps, nextContext) { if (nextProps.isQuery !== this.props.isQuery) this.setState({ - pageInfo: { ...this.state.pageInfo, current: 1 } + pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true }, () => this.getSalaryList(nextProps)); } @@ -56,7 +56,7 @@ class SalaryDetails extends Component { const { pageNum: current, size: pageSize } = params; this.setState({ pageInfo: { ...pageInfo, current, pageSize }, - updateSum: true + updateSum: false }, () => this.getSalaryList(this.props)); } else if (id === "CHECKBOX") { const { selectedRowKeys: checkBox } = params; diff --git a/pc4mobx/hrmSalary/pages/salaryItem/options.js b/pc4mobx/hrmSalary/pages/salaryItem/options.js index 7dbd51b4..58e64e3e 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/options.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/options.js @@ -71,6 +71,16 @@ export const patternOptions = [ key: "8", showname: "8", selected: false + }, + { + key: "9", + showname: "9", + selected: false + }, + { + key: "10", + showname: "10", + selected: false } ]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js index 9447e487..10751d50 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js @@ -246,7 +246,9 @@ class PlanSetTable extends Component { { key: "5", showname: "5" }, { key: "6", showname: "6" }, { key: "7", showname: "7" }, - { key: "8", showname: "8" } + { key: "8", showname: "8" }, + { key: "9", showname: "9" }, + { key: "10", showname: "10" } ]} viewAttr={showOperateBtn ? 2 : 1} onChange={validNum => onEdit({ record: { ...record, validNum }, From d14003a125a7d889468dcfb535a9ad8e7abd9e4a 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 15:48:52 +0800 Subject: [PATCH 02/47] =?UTF-8?q?feature/2.14.4.2406.02-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=AE=97=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 10 +- pc4mobx/hrmSalary/apis/ledger.js | 12 + .../custom-title/weaReqTitle/index.js | 17 + .../custom-title/weaTopTitle/index.js | 15 + .../hrmSalary/pages/calculate/doCalc/index.js | 42 +- .../incomeTaxFieldsCorresponding.js | 147 +++++++ .../pages/ledgerPage/components/index.less | 14 +- .../components/ledgerBaseSetting.js | 24 +- .../ledgerPage/components/ledgerSlide.js | 412 +++++++++--------- pc4mobx/hrmSalary/pages/ledgerPage/index.less | 10 - pc4mobx/hrmSalary/style/index.less | 24 + 11 files changed, 483 insertions(+), 244 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/custom-title/weaReqTitle/index.js create mode 100644 pc4mobx/hrmSalary/components/custom-title/weaTopTitle/index.js create mode 100644 pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js 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; + } +} + 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 03/47] 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%; From e0b6dc4585dc87b362536921296c11c169c8f60f 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:47:08 +0800 Subject: [PATCH 04/47] =?UTF-8?q?feature/2.14.4.2406.02-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollGrant/index.js | 45 +++++++------------ pc4mobx/hrmSalary/stores/payroll.js | 4 +- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 52bb065c..95141435 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -538,7 +538,8 @@ export default class PayrollGrant extends React.Component { grantListCondition, setGrantListShowSearchAd, salaryGrantPageInfo, - getInfoList + getInfoList, + loading } = payrollStore; const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state; const rowSelection = { @@ -569,35 +570,19 @@ export default class PayrollGrant extends React.Component { ]; return (
- } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - buttons={this.getSearchsAdQuick()} - /> - + } iconBgcolor="#F14A2D" + showDropIcon={true} buttons={this.getSearchsAdQuick()}/> - this.setState({ selectedKey: v }, () => { - getInfoList({ - salarySendId: currentId, - isGranted: v !== "0" - }); - }) - } - searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮 - searchsBasePlaceHolder="请输入姓名" - showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板 - setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 - onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 + datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]} + onChange={v => this.setState({ selectedKey: v }, () => { + getInfoList({ salarySendId: currentId, isGranted: v !== "0" }); + })} + searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn} + setShowSearchAd={bool => setGrantListShowSearchAd(bool)} + searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} + onSearch={() => this.handleSearch()} + onSearchChange={v => grantListConditionForm.updateFields({ username: v })} + searchsBaseValue={grantListConditionForm.getFormParams().username} />
@@ -626,7 +611,7 @@ export default class PayrollGrant extends React.Component {
{ - !_.isEmpty(this.getColumns()) ? + !loading ? { + this.loading = false; if (res.status) { this.salaryGrantTableStore = res.data.columns; this.salaryGrantDataSource = res.data.list; @@ -470,7 +472,7 @@ export class payrollStore { } else { message.error(res.errormsg || "获取失败"); } - }); + }).catch(() => this.loading = false); }; // 工资单-工资单发放详情列表 From 808936f54024dd35b932b71cd2e484bd2bbff408 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 17:04:06 +0800 Subject: [PATCH 05/47] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=AE=97=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ledgerPage/components/incomeTaxFieldsCorresponding.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js index 468288c0..3df66b4c 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFieldsCorresponding.js @@ -12,6 +12,7 @@ import { WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom"; import LedgerFieldsItemPopver from "./ledgerFieldsItemPopver"; import { taxruleGetForm } from "../../../apis/ledger"; import LedgerFieldsTable from "./ledgerFieldsTable"; +import uuidV4 from "uuid/v4"; const { getLabel } = WeaLocaleProvider; @@ -37,7 +38,7 @@ class IncomeTaxFields extends Component { 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, + ...o, canEdit: o.canEdit, id: uuidV4(), reportColumnDataIndex: o.taxIndex, reportColumnName: o.name, salaryItem: [{ id: o.salaryItemId, name: o.salaryItemName }] })) })) From 4ebb3a422e76f188064188b651ee47679af3409f 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 17:20:01 +0800 Subject: [PATCH 06/47] =?UTF-8?q?feature/2.14.4.2406.02-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollGrant/index.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 95141435..16043fcd 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -323,6 +323,9 @@ export default class PayrollGrant extends React.Component { onClick={() => this.handleWithdraw({ ids: [record.id] })}> 撤回 + + 预览 + { salarySendDetailBaseInfo.showPdfBtn && this.handleGrant({ ids: [record.id] })}> - 发放 - + + this.handleGrant({ ids: [record.id] })}> + 发放 + + + 预览 + + ); } } From 40fe79c0e52ddfd12ccd3e70def450e6205d327c 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 17:24:21 +0800 Subject: [PATCH 07/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js index e34b5431..281fa6ec 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js @@ -128,13 +128,13 @@ export const salaryItemFields = [ viewAttr: 2, tip: "" }, - // { - // key: "defaultValue", - // label: "默认值", - // type: "INPUT", - // viewAttr: 2, - // tip: "" - // }, + { + key: "defaultValue", + label: "默认值", + type: "INPUT", + viewAttr: 2, + tip: "" + }, { key: "formulaContent", label: "公式", From 2e775eb20578b36ae74b8edea503901c8173bd81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jun 2024 09:07:43 +0800 Subject: [PATCH 08/47] =?UTF-8?q?feature/2.14.4.2406.02-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payroll.js | 4 ++ .../payrollGrant/components/index.less | 6 ++ .../components/payrollPreviewDialog.js | 62 +++++++++++++++++++ .../pages/payroll/payrollGrant/index.js | 32 ++++++++-- 4 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/index.less create mode 100644 pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/payrollPreviewDialog.js diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index b78fac43..8ca9fab7 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -244,3 +244,7 @@ export const getSmsSalaryItemSet = (params) => { export const genPdfBeforeExport = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params); }; +//工资单预览 +export const salaryBillPreview = (params) => { + return postFetch("/api/bs/hrmsalary/salaryBill/preview", params); +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/index.less b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/index.less new file mode 100644 index 00000000..6c2c71f7 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/index.less @@ -0,0 +1,6 @@ +.payPreBox { + .pay-preview-layout { + width: 100%; + height: 100%; + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/payrollPreviewDialog.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/payrollPreviewDialog.js new file mode 100644 index 00000000..763a45a6 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/components/payrollPreviewDialog.js @@ -0,0 +1,62 @@ +/* + * + * 工资单预览 + * @Author: 黎永顺 + * @Date: 2024/6/17 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider } from "ecCom"; +import { salaryBillPreview } from "../../../../apis/payroll"; +import Content from "../../../../components/pcTemplate/content"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class PayrollPreviewDialog extends Component { + constructor(props) { + super(props); + this.state = { + salaryBillData: { salaryTemplate: {}, salaryGroups: [], employeeInformation: {} } + }; + this.preRef = null; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { salaryInfoId, recipient } = nextProps; + salaryBillPreview({ salaryInfoId, recipient }).then(({ status, data }) => { + if (status) { + this.setState({ salaryBillData: data }); + } + }); + } + } + + + render() { + const { + salaryTemplate, salaryGroups, employeeInformation, sendTime + } = this.state.salaryBillData; + const salaryProps = { + theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime, + background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "", + itemTypeList: [employeeInformation, ...salaryGroups] + }; + return ( + this.preRef = dom} scalable hasScroll className="payPreBox" initLoadCss + style={{ + width: 998, height: window.innerHeight - 40, minHeight: 200, minWidth: 380, maxHeight: "90%", + maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }} + > +
{!_.isEmpty(salaryGroups) && }
+
+ ); + } +} + +export default PayrollPreviewDialog; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 16043fcd..acc6bfd1 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -10,6 +10,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; import { genPdfBeforeExport, getPayrollIssuanceProgressBar } from "../../../apis/payroll"; import ProgressModal from "../../../components/progressModal"; +import PayrollPreviewDialog from "./components/payrollPreviewDialog"; const getLabel = WeaLocaleProvider.getLabel; const { ButtonSelect } = WeaDropdown; @@ -31,6 +32,10 @@ export default class PayrollGrant extends React.Component { title: "工资单发放", grantType: "", salarySendId: "" + }, + payrollPreviewDialog: { + visible: false, title: getLabel(111, "工资单预览"), + salaryInfoId: "", recipient: "" } }; this.pageInfo = { current: 1, pageSize: 10 }; @@ -303,7 +308,7 @@ export default class PayrollGrant extends React.Component { }; getColumns = () => { - const { selectedKey, showFeedbackColumn } = this.state; + const { selectedKey, showFeedbackColumn, payrollPreviewDialog } = this.state; const { payrollStore } = this.props; const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore; return _.map([ @@ -323,7 +328,13 @@ export default class PayrollGrant extends React.Component { onClick={() => this.handleWithdraw({ ids: [record.id] })}> 撤回 - + this.setState({ + payrollPreviewDialog: { + ...payrollPreviewDialog, + visible: true, salaryInfoId: record.id, recipient: record.employeeId + } + })}> 预览 { @@ -376,7 +387,12 @@ export default class PayrollGrant extends React.Component { onClick={() => this.handleGrant({ ids: [record.id] })}> 发放 - + this.setState({ + payrollPreviewDialog: { + ...payrollPreviewDialog, + visible: true, salaryInfoId: record.id, recipient: record.employeeId + } + })}> 预览 @@ -549,7 +565,7 @@ export default class PayrollGrant extends React.Component { getInfoList, loading } = payrollStore; - const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state; + const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams, payrollPreviewDialog } = this.state; const rowSelection = { selectedRowKeys, onChange: this.onSelectChange @@ -659,6 +675,14 @@ export default class PayrollGrant extends React.Component { progress={this.state.progress} /> } + {/*工资单预览*/} + this.setState({ + payrollPreviewDialog: { + ...payrollPreviewDialog, + visible: false + } + })}/>
); } From 7221d910cabab1114e3cc5308a71d9f3f6213fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jun 2024 10:44:48 +0800 Subject: [PATCH 09/47] =?UTF-8?q?hotfix/2.14.2.240=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ledgerPage/components/ledgerSalaryItemTable.js | 6 +++--- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index b7121112..fa7675d7 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -109,7 +109,7 @@ class LedgerSalaryItemTable extends Component { formulaContent: formulaContent ? formulaContent : data.formulaContent, originFormulaContent: originFormulaContent ? originFormulaContent : data.originFormulaContent, originSqlContent: originSqlContent ? originSqlContent : data.originSqlContent, - formulaId: formulaId ? formulaId : data.formulaId + formulaId: formulaId ? formulaId : data.formulaId, }, record, userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel })) @@ -151,11 +151,11 @@ class LedgerSalaryItemTable extends Component { }); const { salaryItemId } = record; const { - hideDefault, roundingMode, pattern, valueType, + hideDefault, roundingMode, pattern, valueType, defaultValue, originFormulaContent, originSqlContent, formulaId } = request; this.handleChangeSalaryItem({ - itemHide: hideDefault.toString(), + itemHide: hideDefault.toString(), defaultValue, roundingMode, pattern, valueType, formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent, formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId, diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 47d48a73..19913c32 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -133,11 +133,11 @@ class SalaryItemForm extends Component { return { ...item }; }) }, () => { - // if (key === "valueType" && !this.props.isLedger) { - // onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v }); - // } else { - onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v }); - // } + if (key === "dataType") { + onChangeFieldsItem({ [key]: v, defaultValue: "" }); + } else { + onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v }); + } }); }; From 1c67adbd25fb5c86b1b8d1e02f4c807b37c729f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jun 2024 15:30:46 +0800 Subject: [PATCH 10/47] =?UTF-8?q?feature/2.14.4.2406.02-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=91=E6=94=BE=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index acc6bfd1..8cde7da5 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -335,7 +335,7 @@ export default class PayrollGrant extends React.Component { visible: true, salaryInfoId: record.id, recipient: record.employeeId } })}> - 预览 + {getLabel(111, "查看")} { salarySendDetailBaseInfo.showPdfBtn && @@ -393,7 +393,7 @@ export default class PayrollGrant extends React.Component { visible: true, salaryInfoId: record.id, recipient: record.employeeId } })}> - 预览 + {getLabel(111, "查看")} ); From 10c7903892e76b49cbc005604cb19108499cc02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jun 2024 17:48:08 +0800 Subject: [PATCH 11/47] hotfix/2.14.2.2406.02 --- .../pages/ledgerPage/components/ledgerSalaryItemTable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index fa7675d7..def95fcd 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -88,7 +88,7 @@ class LedgerSalaryItemTable extends Component { handleEditSalaryItem = async (record) => { const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record; const { - itemHide: hideDefault, + itemHide: hideDefault, defaultValue, valueType, name, description, roundingMode, formulaId, dataType, useInEmployeeSalary, pattern, canEdit, formulaContent, originFormulaContent, originSqlContent @@ -109,7 +109,7 @@ class LedgerSalaryItemTable extends Component { formulaContent: formulaContent ? formulaContent : data.formulaContent, originFormulaContent: originFormulaContent ? originFormulaContent : data.originFormulaContent, originSqlContent: originSqlContent ? originSqlContent : data.originSqlContent, - formulaId: formulaId ? formulaId : data.formulaId, + formulaId: formulaId ? formulaId : data.formulaId }, record, userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel })) @@ -123,7 +123,7 @@ class LedgerSalaryItemTable extends Component { ...this.state.salaryItemPayload, visible: true, request: { - canEdit, dataType, description, + canEdit, dataType, description, defaultValue, formulaContent, formulaId, name, hideDefault: _.isNil(hideDefault) ? "0" : hideDefault, valueType, roundingMode, pattern, From 40d150423132c67862216edd018ecc0e687a7301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 19 Jun 2024 10:55:22 +0800 Subject: [PATCH 12/47] =?UTF-8?q?feature/2.14.4.2406.02-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=AE=97=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 5 ++ .../doCalc/components/salaryEditCalc/index.js | 18 +++- .../components/salaryEditCalc/index.less | 5 ++ .../salaryEditCalc/personAbnormalDialog.js | 84 +++++++++++++++++++ 4 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index d7f1fb5b..752461e5 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -286,3 +286,8 @@ export const acctresultCalcTax = (params) => { export const calcTaxFeedback = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/calcTaxFeedback", params); }; +//薪资核算-人员异常 +export const listPage4NotDeclare = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/listPage4NotDeclare", params); +}; + diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js index 54081da1..633a5a92 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js @@ -12,6 +12,7 @@ import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel"; import EditCalcTable from "./editCalcTable"; import SalaryMonthTip from "../salaryMonthTip"; import SalaryCalcLayout from "./salaryCalcLayout"; +import PersonAbnormalDialog from "./personAbnormalDialog"; import cs from "classnames"; import "./index.less"; @@ -22,7 +23,8 @@ class Index extends Component { super(props); this.state = { salarySobCycle: {}, showSearchAd: false, - columnDesc: {}, formulaTd: "", showTotalCell: false + columnDesc: {}, formulaTd: "", showTotalCell: false, + perAbnormalDialog: { visible: false, salaryAcctRecordId: "" } }; } @@ -50,7 +52,7 @@ class Index extends Component { }; render() { - const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state; + const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell, perAbnormalDialog } = this.state; const { routeParams: { salaryAcctRecordId } } = this.props; const formulaObj = _.get(columnDesc, [formulaTd]) || {}; return ( this.onAdSearch(false)}> @@ -65,7 +67,13 @@ class Index extends Component { style={{ marginLeft: 10 }} />
-
+
+
this.setState({ + perAbnormalDialog: { visible: true, salaryAcctRecordId } + })}>{getLabel(111, "未报送人员")}:{salarySobCycle.abnormalEmployeeNum} +
+
@@ -87,6 +95,10 @@ class Index extends Component { this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId} {...this.props} showTotalCell={showTotalCell} onShowFormulaTd={this.handleShowFormulaTa}/> + this.setState({ + perAbnormalDialog: { ...perAbnormalDialog, visible: false } + })}/>
); } diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less index 3d23810b..614973f1 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less @@ -14,6 +14,11 @@ padding-bottom: 0; height: 46px; margin-bottom: 0; + + .abnormal-text { + color: #ef9502; + cursor: pointer; + } } .formula-detail-area { diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js new file mode 100644 index 00000000..1498fc02 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/personAbnormalDialog.js @@ -0,0 +1,84 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-人员异常 + * Description: + * Date: 2023/8/18 + */ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom"; +import { listPage4NotDeclare } from "../../../../../apis/calculate"; + +const { getLabel } = WeaLocaleProvider; + +class PersonAbnormalDialog extends Component { + constructor(props) { + super(props); + this.state = { + pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false, columns: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) this.queryList(nextProps); + } + + queryList = (props) => { + const { salaryAcctRecordId } = props, { pageInfo } = this.state; + const payload = { ...pageInfo, recordId: salaryAcctRecordId }; + this.setState({ loading: true }); + listPage4NotDeclare(payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, list: dataSource, pageNum: current, pageSize, total } = data; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, columns + }); + } else { + + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { loading, columns, dataSource, pageInfo } = this.state; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.queryList(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.queryList(this.props)); + } + }; + return ( + +
+ +
+
+ ); + } +} + +export default PersonAbnormalDialog; From 823788e53164cfc806867ac04e6113c54315edcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 19 Jun 2024 11:24:59 +0800 Subject: [PATCH 13/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/salaryItem/columns.js | 1 + pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js index 281fa6ec..b2cae4bd 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js @@ -133,6 +133,7 @@ export const salaryItemFields = [ label: "默认值", type: "INPUT", viewAttr: 2, + precision: 2, tip: "" }, { diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 19913c32..98a869e3 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -122,6 +122,8 @@ class SalaryItemForm extends Component { return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" }; } else if (key === "valueType" && item.key === "defaultValue") { return { ...item, display: v === "1" }; + } else if (key === "pattern" && item.key === "defaultValue") { + return { ...item, precision: parseInt(v) }; } else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) { return { ...item, @@ -148,7 +150,7 @@ class SalaryItemForm extends Component { { _.map(salaryItemFieldsList, item => { - const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item; + const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item; const value = !_.isNil(request[key]) ? request[key].toString() : ""; return { @@ -181,7 +183,7 @@ class SalaryItemForm extends Component { (type === "INPUTNUMBER" && display) ? - this.handleChangeSalaryFiledItems(key, v)}/> {key === "width" && display && From c39515d7f9835d1b641b6c10de7e37273cec69f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 19 Jun 2024 11:43:08 +0800 Subject: [PATCH 14/47] hotfix/2.14.2.2406.02 --- .../pages/ledgerPage/components/ledgerSalaryItemEditSlide.js | 4 +++- pc4mobx/hrmSalary/pages/salaryItem/index.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js index d476edbd..288f6303 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaLocaleProvider, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import SalaryItemForm from "../../salaryItem/salaryItemForm"; +import { toDecimal_n } from "../../../util"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -21,7 +22,8 @@ class LedgerSalaryItemEditSlide extends Component { handleChange = (params) => { const request = { ...this.props.request, ...params }; const key = Object.keys(params)[0]; - this.props.onUpdateRequest(request, key); + const { defaultValue, pattern, ...extra } = request; + this.props.onUpdateRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }, key); }; handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName); diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 4be1e225..d96ae163 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -2,7 +2,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom"; -import { renderLoading } from "../../util"; +import { renderLoading, toDecimal_n } from "../../util"; import CustomTab from "../../components/customTab"; import SystemSalaryItemModal from "./systemSalaryItemModal"; import { columns } from "./columns"; @@ -358,7 +358,8 @@ export default class SalaryItem extends React.Component { const handleSaveSlideChange = (value) => { const { salaryItemStore: { setRequest } } = this.props; - setRequest(value); + const { defaultValue, pattern, ...extra } = value; + setRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }); }; const rowSelection = { selectedRowKeys, From 6f29f9c56a8746988f6b4073847e0324490250d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 20 Jun 2024 09:15:07 +0800 Subject: [PATCH 15/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/reportView/components/condition.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js index f0c3b8e6..23980906 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js @@ -484,6 +484,10 @@ export const mapBarOptions = (params) => ({ ]; } }, + textStyle: { + textShadowColor: "transparent", + color: "#fff" + }, rich: { a: { fontWeight: "bold", From 93c39cad413967707f74fa499dc8c8dc45215bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 20 Jun 2024 11:17:30 +0800 Subject: [PATCH 16/47] hotfix/2.14.2.2406.02 --- .../components/ledgerSalaryItemEditSlide.js | 4 +--- .../components/ledgerSalaryItemTable.js | 3 ++- pc4mobx/hrmSalary/pages/salaryItem/index.js | 21 ++++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js index 288f6303..d476edbd 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemEditSlide.js @@ -8,7 +8,6 @@ import React, { Component } from "react"; import { WeaLocaleProvider, WeaSlideModal } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import SalaryItemForm from "../../salaryItem/salaryItemForm"; -import { toDecimal_n } from "../../../util"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -22,8 +21,7 @@ class LedgerSalaryItemEditSlide extends Component { handleChange = (params) => { const request = { ...this.props.request, ...params }; const key = Object.keys(params)[0]; - const { defaultValue, pattern, ...extra } = request; - this.props.onUpdateRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }, key); + this.props.onUpdateRequest(request, key); }; handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName); diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index def95fcd..16db4771 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -10,6 +10,7 @@ import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide"; import { getSalaryItemForm } from "../../../apis/ledger"; import { commonEnumList } from "../../../apis/ruleconfig"; import FormalFormModal from "../../salaryItem/formalFormModal"; +import { toDecimal_n } from "../../../util"; const getLabel = WeaLocaleProvider.getLabel; @@ -155,7 +156,7 @@ class LedgerSalaryItemTable extends Component { originFormulaContent, originSqlContent, formulaId } = request; this.handleChangeSalaryItem({ - itemHide: hideDefault.toString(), defaultValue, + itemHide: hideDefault.toString(), defaultValue: toDecimal_n(defaultValue, parseInt(pattern)), roundingMode, pattern, valueType, formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent, formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId, diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index d96ae163..7f55028d 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -314,16 +314,18 @@ export default class SalaryItem extends React.Component { }); return; } - saveItem(payload, continueFlag).then(() => { - getTableDatas({ ...this.state.searchParams }).then(res => { - this.setState({ - searchParams: { - ...this.state.searchParams, - total: res.total - } + const { pattern, defaultValue, ...extra } = payload; + saveItem({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }, continueFlag) + .then(() => { + getTableDatas({ ...this.state.searchParams }).then(res => { + this.setState({ + searchParams: { + ...this.state.searchParams, + total: res.total + } + }); }); }); - }); }; const renderCustomOperate = () => { @@ -358,8 +360,7 @@ export default class SalaryItem extends React.Component { const handleSaveSlideChange = (value) => { const { salaryItemStore: { setRequest } } = this.props; - const { defaultValue, pattern, ...extra } = value; - setRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }); + setRequest(value); }; const rowSelection = { selectedRowKeys, From 4d56e8284f9097db844a424774f23016edc011f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 20 Jun 2024 14:06:16 +0800 Subject: [PATCH 17/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 98a869e3..8c87cfb9 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -183,9 +183,10 @@ class SalaryItemForm extends Component { (type === "INPUTNUMBER" && display) ? - this.handleChangeSalaryFiledItems(key, v)}/> + this.handleChangeSalaryFiledItems(key, v)}/> {key === "width" && display && px} From 3ba154484202f8054735913d2f55cbbe16cee147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 20 Jun 2024 17:18:12 +0800 Subject: [PATCH 18/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 8c87cfb9..12d0c7bf 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -51,7 +51,7 @@ class SalaryItemForm extends Component { return { ...item, label: getLabel(item.lanId, item.label), - display: ((!isLedger && key === "width") || key === "sortedIndex") + display: !isLedger }; case "useInEmployeeSalary": return { From 6bb79ab685cb36e2945e01f65834af9e7149a24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 20 Jun 2024 17:25:55 +0800 Subject: [PATCH 19/47] hotfix/2.14.2.2406.02 --- .../pages/ledgerPage/components/ledgerSalaryItemTable.js | 5 +++-- pc4mobx/hrmSalary/pages/salaryItem/index.js | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js index 16db4771..838f44a0 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js @@ -153,10 +153,11 @@ class LedgerSalaryItemTable extends Component { const { salaryItemId } = record; const { hideDefault, roundingMode, pattern, valueType, defaultValue, - originFormulaContent, originSqlContent, formulaId + originFormulaContent, originSqlContent, formulaId, dataType } = request; this.handleChangeSalaryItem({ - itemHide: hideDefault.toString(), defaultValue: toDecimal_n(defaultValue, parseInt(pattern)), + itemHide: hideDefault.toString(), + defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue, roundingMode, pattern, valueType, formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent, formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId, diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 7f55028d..09875add 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -314,8 +314,11 @@ export default class SalaryItem extends React.Component { }); return; } - const { pattern, defaultValue, ...extra } = payload; - saveItem({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }, continueFlag) + const { pattern, defaultValue, dataType, ...extra } = payload; + saveItem({ + ...extra, pattern, dataType, + defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue + }, continueFlag) .then(() => { getTableDatas({ ...this.state.searchParams }).then(res => { this.setState({ From a4e072e3eee34eb1234997aeaddd87968b5e8a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 21 Jun 2024 10:05:47 +0800 Subject: [PATCH 20/47] hotfix/2.14.2.2406.02 --- .../pages/reportView/components/condition.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js index 23980906..d6668459 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js @@ -403,8 +403,8 @@ export const mapBarOptions = (params) => ({ }, grid: { top: "10%", - right: "0%", - left: "5%", + right: "2%", + left: "2%", bottom: "10%", containLabel: true }, @@ -457,8 +457,9 @@ export const mapBarOptions = (params) => ({ series: _.map(params.data, (item, index) => { return { name: item.name, - barWidth: "32", - barGap: "0%", + barMaxWidth: 30, + barMinWidth: 10, + barGap: 0, data: _.map(item.data, (it) => it.replace(/,/g, "")), type: "bar", itemStyle: { @@ -505,8 +506,9 @@ export const mapBarOptions = (params) => ({ }), dataZoom: [ { - type: "inside" - + type: "inside", + start: params.xAxis.length <= 7 ? 0 : 25, + end: params.xAxis.length <= 7 ? 100 : 75, }, { type: "slider", From da6a8266f6c428f7ec9ce417765a3e8202b871a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 26 Jun 2024 10:02:45 +0800 Subject: [PATCH 21/47] hotfix/2.14.2.2406.02 --- .../analysisOfSalaryStatistics/components/salaryDetails.js | 6 +++++- pc4mobx/hrmSalary/pages/payrollFiles/config/index.js | 3 ++- pc4mobx/hrmSalary/stores/payrollFiles.js | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 9d8d2816..3f01a8bf 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -99,13 +99,17 @@ class SalaryDetails extends Component { }).catch(() => this.setState({ loading: false })); }; handleExportSalaryList = (key) => { + const { attendanceStore: { tableStore } } = this.props; let { selectedRowKeys, payload } = this.state; if (key === "SELECTED" && selectedRowKeys.length === 0) { message.warning(getLabel(543345, "请选择需要导出的数据!")); return; } WeaLoadingGlobal.start(); - const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] }); + const promise = API.exportSalaryList({ + ...payload, ids: key === "SELECTED" ? selectedRowKeys : [], + columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex) + }); }; getColumns = () => { const { attendanceStore: { tableStore } } = this.props; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js index 25b815a0..e1ee1288 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [ }, { conditionType: "SELECT", - domkey: ["taxAgentId"], + domkey: ["taxAgentIds"], fieldcol: 16, label: getLabel(537996, "个税扣缴义务人"), labelcol: 8, + multiple: true, options: [], viewAttr: 2 }, diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js index c9095936..d70e0113 100644 --- a/pc4mobx/hrmSalary/stores/payrollFiles.js +++ b/pc4mobx/hrmSalary/stores/payrollFiles.js @@ -24,11 +24,12 @@ export class PayrollFilesStore { @action("薪资档案-列表查询") queryList = (payload = {}, searchItemsValue = {}, url = "") => { return new Promise((resolve, reject) => { - const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue; + const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue; API.queryList({ departmentIds: departmentIds ? departmentIds.split(",") : [], positionIds: positionIds ? positionIds.split(",") : [], subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [], + taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [], statuses: statuses ? statuses.split(",") : [], ...payload, ...extra, url }).then(res => { From 3ee2ece60d015cb4dc01b6ac5d8d93edf84bbabe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 26 Jun 2024 10:07:45 +0800 Subject: [PATCH 22/47] hotfix/2.14.2.2406.02 --- .../components/salaryFileAdvanceSearchPannel/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js index d7b43cd5..3f164873 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileAdvanceSearchPannel/index.js @@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component { ...child, options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel })) }; - } else if (getKey(child) === "taxAgentId") { + } else if (getKey(child) === "taxAgentIds") { return { ...child, options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content })) From 230aea8d622981f10a5b044d252afee387234d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 28 Jun 2024 16:57:05 +0800 Subject: [PATCH 23/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 12d0c7bf..4a1ed275 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -88,7 +88,7 @@ class SalaryItemForm extends Component { return { ...item, type: dataType === "number" ? "INPUTNUMBER" : "INPUT", - display: valueType && valueType.toString() === "1", + display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0, viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1 }; case "formulaContent": From 5a2ecefa6f32014bf567cf9c9fc840d8a8a58322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 2 Jul 2024 15:05:17 +0800 Subject: [PATCH 24/47] hotfix/2.14.2.2406.02 --- pc4mobx/hrmSalary/pages/ruleConfig/form.js | 10 +++++-- .../hrmSalary/pages/ruleConfig/ruleConfig.js | 27 ++++++++++++------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/form.js b/pc4mobx/hrmSalary/pages/ruleConfig/form.js index c1308ec4..9b17f248 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/form.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/form.js @@ -1,7 +1,9 @@ import React from "react"; -import { WeaFormItem, WeaSearchGroup } from "ecCom"; +import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom"; import { WeaSwitch } from "comsMobx"; +const getKey = WeaTools.getKey; + export const renderRuleForm = (form, condition, onChange) => { const { isFormInit } = form; const formParams = form.getFormParams(); @@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => { label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }} wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)} tipPosition="bottom"> - + getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)} + onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })} + /> ), colSpan: 1, hide: fields.hide diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index efda13dd..3f24a0d6 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -25,6 +25,7 @@ class RuleConfig extends Component { super(props); this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 }; this.timer = null; + this.handleDebounce = null; } componentDidMount() { @@ -116,16 +117,22 @@ class RuleConfig extends Component { case "taxAgentShowStatus": case "salaryShowStatus": case "adjustShowStatus": - const confTitle = { - welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"), - welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"), - salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"), - extEmpsWitch: getLabel(544097, "开启非系统人员"), - taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), - salaryShowStatus: getLabel(111, "显示工资单页签"), - adjustShowStatus: getLabel(111, "显示调薪记录页签") - }; - this.unifiedSettings(key, confTitle[key]); + if (!this.handleDebounce) { + this.handleDebounce = _.debounce(() => { + const confTitle = { + welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"), + welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"), + salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"), + extEmpsWitch: getLabel(544097, "开启非系统人员"), + taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"), + salaryShowStatus: getLabel(111, "显示工资单页签"), + adjustShowStatus: getLabel(111, "显示调薪记录页签") + }; + this.unifiedSettings(key, confTitle[key]); + this.handleDebounce = null; + }, 500); + } + this.handleDebounce(); break; default: break; From 92d72d3eac14866300a447959968dca8b5930535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 3 Jul 2024 11:12:15 +0800 Subject: [PATCH 25/47] =?UTF-8?q?release/2.14.4.2406.02-=E4=B8=AA=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index e9968ff5..73bda8ff 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -530,7 +530,7 @@ class Index extends Component { }; render() { - const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props; + const { taxAgentStore: { showOperateBtn, taxAgentOption }, cumSituationStore: { form } } = this.props; const { declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload, year, exportPayloadType, cumTaxPeriodDialog, targetid @@ -549,7 +549,7 @@ class Index extends Component { targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })} > this.setState({ cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" } })} From 4e29c4ed936b9804a0f0d3dea4b65676a7d079da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 4 Jul 2024 18:50:31 +0800 Subject: [PATCH 26/47] =?UTF-8?q?feature/2.14.4.2406.02-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../declareDetail/components/paymentBtn.js | 19 ++++++++++--------- .../hrmSalary/pages/declareDetail/index.js | 6 +++--- .../pages/employeedeclareDetail/index.js | 6 ++++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js index 4f6ad59f..e187d81d 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js @@ -332,15 +332,16 @@ class PaymentBtn extends Component { const { paymentDialog } = this.state; return ( - - {getLabel(111, "银行端凭证缴款")} - {getLabel(111, "作废缴款凭证")} - - } - type="ghost">{getLabel(111, "三方缴款")} + + {/**/} + {/* {getLabel(111, "银行端凭证缴款")}*/} + {/* {getLabel(111, "作废缴款凭证")}*/} + {/* */} + {/* }*/} + {/* type="ghost">{getLabel(111, "三方缴款")}*/} confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}, - + // )); if (!intelCalcSalaryStatus) { if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) { diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js index ed7805cf..f9783c57 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js @@ -21,7 +21,8 @@ import { employeedeclareList4Add, employeedeclareList4Update, employeedeclareRefresh, - employeeDelete, employeeInvalid, + employeeDelete, + employeeInvalid, getDeclareFeedback } from "../../apis/declare"; import { advanceConditions, submitStatus } from "./constants"; @@ -146,7 +147,8 @@ class Index extends Component { "总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"), "操作": getLabel(30585, "操作"), "删除": getLabel(535052, "删除"), "共": getLabel(83698, "共"), "条": getLabel(18256, "条"), - "加载中": getLabel(83698, "加载中"), "作废": getLabel(111, "作废") + "加载中": getLabel(83698, "加载中") + // "作废": getLabel(111, "作废") }; const childFrameObj = document.getElementById("atdTable"); childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); From 5f4d52761af705ee6e358c8dd6259ef52ed5b8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 10 Jul 2024 14:35:11 +0800 Subject: [PATCH 27/47] =?UTF-8?q?custom/=E4=B8=8A=E6=B5=B7=E6=B8=AF?= =?UTF-8?q?=E6=B9=BE=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/paymentFeedbackBtn.js | 4 +-- .../components/taxDeclarationInfo.js | 28 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js index fca56898..ee0bdf44 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js @@ -152,8 +152,8 @@ class PaymentFeedbackBtn extends Component { return { ...it, options: [ - { key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款") }, - { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") } + { key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true }, + // { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") } ] }; }) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js index ec5edc9c..16eb0b9b 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js @@ -55,20 +55,20 @@ class TaxDeclarationInfo extends Component { ]; let dropMenuDatas = []; if (["DECLARE_SUCCESS_NO_PAY", "DECLARE_SUCCESS_UNPAID", "DECLARE_SUCCESS_PAID", "DECLARE_SUCCESS_PAYING"].includes(declareInfo.declareStatus)) { - dropMenuDatas = dropMenuDatas.concat([ - { - key: "exportGetDeclareTaxResultFeedback", - icon: , - content: getLabel(111, "下载申报内置算税结果"), - onClick: onOperate - }, - { - key: "onlineComparison", - icon: , - content: getLabel(111, "在线对比"), - onClick: onOperate - } - ]); + // dropMenuDatas = dropMenuDatas.concat([ + // { + // key: "exportGetDeclareTaxResultFeedback", + // icon: , + // content: getLabel(111, "下载申报内置算税结果"), + // onClick: onOperate + // }, + // { + // key: "onlineComparison", + // icon: , + // content: getLabel(111, "在线对比"), + // onClick: onOperate + // } + // ]); } return (
From 4d2058b180951384bc3d6cfb8003fdb32edff7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 11 Jul 2024 15:05:00 +0800 Subject: [PATCH 28/47] hotfix/2.14.2.2406.02 --- .../reportView/components/reportContent.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index a7808410..98486950 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { Spin } from "antd"; -import { WeaEchart } from "ecCom"; +import { WeaEchart, WeaLocaleProvider } from "ecCom"; import RightOptions from "./rightOptions"; import ChartsRangeSettingsModal from "./chartsRangeSettingsModal"; import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition"; @@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal"; import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide"; import "../index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class ReportContent extends Component { constructor(props) { super(props); @@ -33,7 +35,8 @@ class ReportContent extends Component { rangSet: { visible: false, reportId: "", rangeVal: {} - } + }, + pageInfo: { current: 0, pageSize: 10, total: 0 } }; } @@ -76,24 +79,29 @@ class ReportContent extends Component { } }; postMessageToChild = (payload) => { + const i18n = { + "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), + "总计": getLabel(523, "总计") + }; const childFrameObj = document.getElementById("atdTable"); const { dataSource, columns, showSum, countResult } = payload; childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ - dataSource, columns, showSum, countResult + dataSource, columns, showSum, countResult, i18n }), "*"); }; reportStatisticsReportGetData = (params) => { + const { pageInfo } = this.state; const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params; const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType); const payload = { - id, dimensionId, isShare, + id, dimensionId, isShare, ...pageInfo, salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01" }; this.setState({ loading: true }); reportStatisticsReportGetData(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status && id.toString() === data.reportId.toString()) { - const { countResult, columns, pageInfo: { list } } = data; + const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data; this.setState({ countResult, columns: _.map(columns, it => ({ @@ -244,8 +252,8 @@ class ReportContent extends Component { viewType === "dataView" ?