From 0a23b261b198e250c2fc03d3d02060f151910041 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, 14 Mar 2024 10:14:06 +0800 Subject: [PATCH 1/5] release/3.0.0.2403.01 --- pc4mobx/hrmSalary/apis/index.js | 2 +- pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 007bb6e6..4cb3b93c 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -24,7 +24,7 @@ export const getTableDatas = (params) => { export const getLogs = params => { const payload = { ...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa", - showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"}]" + showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]" }; return postFetch("/api/bs/hrmelog/elog/getLogs", payload); }; diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js index 45049a14..3e50d8ad 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js @@ -43,6 +43,11 @@ class RuleConfig extends Component { return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) }; } else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") { return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 }; + } else if (getKey(o) === "taxDeclarationFunction") { + return { + ...o, + viewAttr: (_.isNil(sysinfo.taxDeclarationFunction) || sysinfo.taxDeclarationFunction !== "0") ? 2 : 1 + }; } return { ...o }; }) @@ -189,6 +194,7 @@ class RuleConfig extends Component { API.operateTaxDeclarationFunction({ operateTaxDeclaration }).then(({ status, errormsg }) => { if (status) { message.success(getLabel(22619, "保存成功!")); + const promise = this.init(); } else { message.error(errormsg || getLabel(22620, "保存失败!")); } From 85c222def8426529036415ebbed2fd8849e263e2 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, 26 Mar 2024 09:14:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E7=9A=84?= =?UTF-8?q?=E5=BC=80=E5=8F=91=201=E3=80=81=E8=A1=A5=E7=AE=97=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 + .../pages/supplementaryCalc/index.js | 190 ++++++++++++++++++ .../pages/supplementaryCalc/index.less | 0 3 files changed, 193 insertions(+) create mode 100644 pc4mobx/hrmSalary/pages/supplementaryCalc/index.js create mode 100644 pc4mobx/hrmSalary/pages/supplementaryCalc/index.less diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 0990c113..1aaf8045 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -51,6 +51,7 @@ import WatermarkPreview from "./pages/payroll/watermarkPreview"; import ExternalPersonManage from "./pages/externalPersonManage"; import AdjustSalaryManage from "./pages/adjustSalaryManage"; import TopologyMap from "./pages/topologyMap"; +import SupplementaryCalc from "./pages/supplementaryCalc"; import stores from "./stores"; import "./style/index"; @@ -110,6 +111,7 @@ const DataAcquisition = (props) => props.children; // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 // adjustSalaryManage 档案管理 +// supplementaryCalc 补算 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/supplementaryCalc/index.js b/pc4mobx/hrmSalary/pages/supplementaryCalc/index.js new file mode 100644 index 00000000..558c2c38 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/supplementaryCalc/index.js @@ -0,0 +1,190 @@ +/* + * Author: 黎永顺 + * name: 补算 + * Description: + * Date: 2024/3/26 + */ +import React, { Component } from "react"; +import { Button, message } from "antd"; +import { WeaBrowser, WeaError, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom"; +import { supplementAcctRecord } from "../../apis"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + type: "sob", salaryItemIds: "", salarySobIds: "", + salaryAcctRecordIds: "", loading: false + }; + } + + handleChangeItems = (key, value) => { + this.setState({ [key]: value }); + }; + handleSubmit = () => { + const { salaryItemIds, salarySobIds, salaryAcctRecordIds, type } = this.state; + if (!salaryItemIds && !salarySobIds && type === "sob") { + this.refs.salaryItemError.showError(); + this.refs.salarySobError.showError(); + return; + } + if (!salaryItemIds && !salaryAcctRecordIds && type === "record") { + this.refs.salaryItemError.showError(); + this.refs.salaryPigeonholeError.showError(); + return; + } + if (!salaryItemIds) { + this.refs.salaryItemError.showError(); + return; + } + if (!salaryAcctRecordIds && type === "record") { + this.refs.salaryPigeonholeError.showError(); + return; + } + if (!salarySobIds && type === "sob") { + this.refs.salarySobError.showError(); + return; + } + this.setState({ loading: true }); + supplementAcctRecord({ + type, + salaryAcctRecordIds: salaryAcctRecordIds ? salaryAcctRecordIds.split(",") : [], + salarySobIds: salarySobIds ? salarySobIds.split(",") : [], + salaryItemIds: salaryItemIds ? salaryItemIds.split(",") : [] + }).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(111, "补算成功")); + } else { + message.error(errormsg || getLabel(111, "补算失败")); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { type, salaryItemIds, salarySobIds, salaryAcctRecordIds, loading } = this.state; + return ( + } + buttons={[ + + ]} + > +
+ + + + this.setState({ type }, () => { + this.setState({ salarySobIds: "", salaryAcctRecordIds: "", salaryItemIds: "" }); + })} + /> + + + { + type === "sob" ? + + + this.handleChangeItems("salarySobIds", salarySobIds)} + /> + + : + + + this.handleChangeItems("salaryAcctRecordIds", salaryAcctRecordIds)} + /> + + + } + + + this.handleChangeItems("salaryItemIds", salaryItemIds)} + /> + + + +
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/supplementaryCalc/index.less b/pc4mobx/hrmSalary/pages/supplementaryCalc/index.less new file mode 100644 index 00000000..e69de29b From 8d58561b887be557a637fd7e26df4eed1d731c3d 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, 26 Mar 2024 17:07:21 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feature/2.12.1.2403.02-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E7=9A=84?= =?UTF-8?q?=E5=BC=80=E5=8F=91=201=E3=80=81=E8=A1=A5=E7=AE=97=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E6=88=90=202=E3=80=81=E8=96=AA?= =?UTF-8?q?=E9=85=AC=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8-=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E8=A1=A8=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/index.js | 5 +- pc4mobx/hrmSalary/apis/statistics.js | 14 +- .../components/advanceInputBtn/index.js | 33 ++++ .../components/advanceInputBtn/index.less | 29 ++++ .../components/conditions.js | 88 +++++++++++ .../components/salaryDetails.js | 148 ++++++++++++++++++ .../components/searchPannel/index.js | 77 +++++++++ .../pages/analysisOfSalaryStatistics/index.js | 75 +++++++-- .../analysisOfSalaryStatistics/index.less | 58 ++++++- .../pages/reportView/components/condition.js | 13 ++ .../statisticalMicroSettingsSlide.js | 16 +- .../pages/supplementaryCalc/index.less | 7 + pc4mobx/hrmSalary/stores/attendanceStore.js | 5 +- 13 files changed, 545 insertions(+), 23 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/searchPannel/index.js diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js index 4cb3b93c..92514839 100644 --- a/pc4mobx/hrmSalary/apis/index.js +++ b/pc4mobx/hrmSalary/apis/index.js @@ -39,4 +39,7 @@ export const getDetailChanges = params => { export const getSalarysobListAll = params => { return postFetch("/api/bs/hrmsalary/salarysob/listAll", params); }; - +//补算 +export const supplementAcctRecord = (params) => { + return postFetch("/api/bs/hrmsalary/salaryacct/supplementAcctRecord", params); +}; diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 3b70ee59..76056002 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //薪酬统计维度下拉列表 export const dimensionGetForm = (params) => { @@ -122,3 +122,15 @@ export const getExpandFieldSettings = (params) => { export const statisticsReportDuplicate = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/duplicate", "GET", params); }; +//薪酬统计报表-薪资明细列表 +export const getSalaryList = (params) => { + return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryList", params); +}; +//薪酬统计报表-薪资明细列表总计行 +export const getSalaryListSum = (params) => { + return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryListSum", params); +}; +// 薪酬统计报表-薪资明细导出 +export const exportSalaryList = (params) => { + return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params); +}; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js new file mode 100644 index 00000000..86a5f416 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.js @@ -0,0 +1,33 @@ +/* + * Author: 黎永顺 + * name:薪酬统计报表-高级搜索 + * Description: + * Date: 2024/3/26 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { Button } from "antd"; +import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("attendanceStore") +@observer +class Index extends Component { + render() { + const { attendanceStore: { salaryDetailSearchForm } } = this.props; + return ( +
+ salaryDetailSearchForm.updateFields({ keyword: v })} + onSearch={this.props.onAdvanceSearch} + /> + +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less new file mode 100644 index 00000000..9081d39f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/advanceInputBtn/index.less @@ -0,0 +1,29 @@ +.achrive-advance-search { + display: flex; + align-items: center; + position: relative; + top: -1.5px; + + .wea-advanced-search { + top: 2px; + left: -1px; + height: 28px; + line-height: 1; + border-radius: 0; + position: relative; + color: #474747; + padding: 4px 15px; + } + + .wea-advanced-search:hover { + border: 1px solid #dadada; + color: #474747; + } + + .text-elli { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 1px; + } +} diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js index 080dd0e4..6a19614c 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -1,3 +1,4 @@ +import React from "react"; import { WeaLocaleProvider } from "ecCom"; const { getLabel } = WeaLocaleProvider; @@ -131,3 +132,90 @@ export const extensionCondition = [ defaultshow: true } ]; +export const salaryDetailSearchConditions = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["keyword"], + fieldcol: 16, + label: getLabel(111, "姓名/工号"), + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "SELECT", + domkey: ["taxAgentIds"], + fieldcol: 16, + label: getLabel(537996, "个税扣缴义务人"), + labelcol: 8, + options: [], + multiple: true, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "164", + viewAttr: 2 + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["subcompanyIds"], + fieldcol: 16, + label: getLabel(33553, "分部"), + labelcol: 8, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57", + viewAttr: 2 + }, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 16, + label: getLabel(27511, "部门"), + labelcol: 8, + viewAttr: 2 + } + ], + defaultshow: true, + title: getLabel(1361, "基本信息"), + col: 2 + } +]; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js new file mode 100644 index 00000000..e83e95ca --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -0,0 +1,148 @@ +/* + * Author: 黎永顺 + * name:薪资明细列表 + * Description: + * Date: 2024/3/26 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom"; +import { WeaTableNew } from "comsMobx"; +import { message, Spin } from "antd"; +import * as API from "../../../apis/statistics"; +import { getIframeParentHeight } from "../../../util"; +import { sysConfCodeRule } from "../../../apis/ruleconfig"; +import "../index.less"; + +const WeaTableComx = WeaTableNew.WeaTable; +const { getLabel } = WeaLocaleProvider; + +@inject("attendanceStore") +@observer +class SalaryDetails extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, dataSource: [], columns: [], selectedRowKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, + countResult: {}, showTotalCell: false + }; + } + + componentDidMount() { + this.getSalaryList(this.props); + window.addEventListener("message", this.handleReceive, false); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isQuery !== this.props.isQuery) this.getSalaryList(nextProps); + } + + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + this.setState(({ selectedRowKeys: [] })); + } + + handleReceive = ({ data }) => { + const { type, payload: { id, params } = {} } = data; + const { pageInfo } = this.state; + if (type === "init") { + this.getColumns(); + } else if (type === "turn") { + if (id === "PAGEINFO") { + const { pageNum: current, size: pageSize } = params; + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.getSalaryList(this.props)); + } else if (id === "CHECKBOX") { + const { selectedRowKeys: checkBox } = params; + this.setState({ selectedRowKeys: checkBox }); + } + } + }; + postMessageToChild = (payload) => { + const i18n = { + "共": getLabel(18609, "共"), "条": getLabel(18256, "条"), + "总计": getLabel(523, "总计") + }; + const childFrameObj = document.getElementById("atdTable"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + }; + getSalaryList = (props) => { + const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props; + const [startDateStr, endDateStr] = dateRange; + const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams(); + const { pageInfo } = this.state; + const payload = { + taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [], + departmentIds: departmentIds ? departmentIds.split(",") : [], + subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [], + ...extra, ...pageInfo, startDateStr, endDateStr + }; + this.setState({ loading: true }); + API.getSalaryList(payload).then(async ({ status, data }) => { + const [{ data: sumData }, { data: confCode }] = await Promise.all([API.getSalaryListSum(payload), sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); + this.setState({ loading: false }); + if (status) { + const { dataKey, pageInfo: pageparams } = data; + const { list: dataSource, pageNum: current, total, pageSize } = pageparams; + this.setState({ + dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload, + countResult: sumData.sumRow, showTotalCell: confCode === "1" + }, () => tableStore.getDatas(dataKey.datas)); + } + }).catch(() => this.setState({ loading: false })); + }; + handleExportSalaryList = (key) => { + let { selectedRowKeys, payload } = this.state; + if (key === "SELECTED" && selectedRowKeys.length === 0) { + message.warning(getLabel(543345, "请选择需要导出的数据!")); + return; + } + WeaLoadingGlobal.start(); + const promise = API.exportSalaryList({ ...payload, ids: selectedRowKeys }); + }; + getColumns = () => { + const { attendanceStore: { tableStore } } = this.props; + const { dataSource, pageInfo, selectedRowKeys, countResult, showTotalCell } = this.state; + const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); + if (!_.isEmpty(columns)) { + this.postMessageToChild({ + dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, + sumRow: countResult, + columns: _.map(columns, (it, idx) => ({ + ...it, + width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth, + fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "", + ellipsis: true + })) + }); + } + return []; + }; + + render() { + const { loading, dataSource } = this.state; + const { attendanceStore: { tableStore } } = this.props; + return ( +
+ +