From 80acc5f18a05b8db27091bfb1bc8b930d75ab403 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, 18 Mar 2024 16:03:04 +0800 Subject: [PATCH 01/13] hotfix/2.12.1.2403.02 --- pc4mobx/hrmSalary/components/importDialog/index.less | 6 +++++- pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less index 4c9430f2..d37389ea 100644 --- a/pc4mobx/hrmSalary/components/importDialog/index.less +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -152,7 +152,11 @@ padding: 0 !important; } - .wea-select, .ant-select-selection, .ant-select { + .wea-select { + width: 200px !important; + } + + .ant-select-selection, .ant-select { width: 100%; } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 5d9db24e..7fca9256 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -545,7 +545,7 @@ export const DataCollectionDatePicker = (props) => { export const DataCollectionSelect = (props) => { const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14, viewAttr = 2 } = props; return - onChange({ key, value: val })} options={options} + onChange({ key, value: val })} options={options} viewAttr={viewAttr}/> ; }; From d9f3fafd51e13c4ee23a472c3abf808b633b12f0 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, 19 Mar 2024 14:29:00 +0800 Subject: [PATCH 02/13] =?UTF-8?q?hotfix/2.12.1.2403.02=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=80=8F=E8=A7=86=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/payrollFiles.js | 70 ++++++++++--------- .../pages/reportView/components/index.less | 7 ++ .../components/povitpivotChartModal.js | 21 ++++-- pc4mobx/hrmSalary/util/request.js | 3 + 4 files changed, 63 insertions(+), 38 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payrollFiles.js b/pc4mobx/hrmSalary/apis/payrollFiles.js index 7ebdb6bb..f2516b5a 100644 --- a/pc4mobx/hrmSalary/apis/payrollFiles.js +++ b/pc4mobx/hrmSalary/apis/payrollFiles.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { postFetch } from "../util/request"; +import { postExportFetch, postFetch } from "../util/request"; //获取薪资档案各tab的人数 export const queryTabTotal = (params) => { @@ -11,65 +11,69 @@ export const queryList = ({ url, ...params }) => { }; // 导入档案 export const importSalaryArchive = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params); +}; // 薪资档案预览 export const salaryArchivePreview = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params); +}; // 公共枚举接口 export const commonEnumList = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params); +}; // 获取导入类型 export const getImportTypes = () => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {}); -} + return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {}); +}; // 发起调薪地址 export const salaryAdjustmentInfo = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params); +}; // 停薪 export const stopSalary = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params); +}; // 一键全部设为定薪员工 export const allGotoFixed = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoFixed", params); +}; // 设为定薪员工 export const gotoFixed = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/gotoFixed", params); +}; // 停薪 export const gotoStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/gotoStop", params); +}; //全部停薪 export const allGotoStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoStop", params); +}; // 取消停薪 export const cancelStop = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/cancelStop", params); +}; // 保存发薪设置 export const savePaySet = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/savePaySet', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/savePaySet", params); +}; // 待定薪删除待办 export const deletePendingTodo = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deletePendingTodo', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deletePendingTodo", params); +}; // 待停薪删除待办 export const deleteSuspendTodo = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo", params); +}; // 待定薪、停薪员工 是否允许删除薪资档案 export const salaryArchiveDelete = (params) => { - return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params); -} + return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete", "GET", params); +}; // 删除薪资档案 export const deleteSalaryArchive = (params) => { - return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params); -} + return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive", params); +}; +// 数据透视列表导出 +export const exportDataPerspective = (params) => { + return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportDataPerspective", params); +}; diff --git a/pc4mobx/hrmSalary/pages/reportView/components/index.less b/pc4mobx/hrmSalary/pages/reportView/components/index.less index d77aab7f..53e93a64 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/index.less +++ b/pc4mobx/hrmSalary/pages/reportView/components/index.less @@ -62,6 +62,13 @@ .ant-spin-nested-loading, .ant-spin-container { height: 100%; } + + .header-custom { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + } } .shareDialogWrapper { diff --git a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js index 801bb99e..9f9bddf7 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js @@ -5,11 +5,12 @@ * Date: 2023/6/8 */ import React, { Component } from "react"; -import { WeaDialog, WeaLocaleProvider } from "ecCom"; -import { WeaTableNew } from "comsMobx"; -import { Spin } from "antd"; -import { toJS } from "mobx"; import { inject, observer } from "mobx-react"; +import { WeaDialog, WeaLoadingGlobal, WeaLocaleProvider } from "ecCom"; +import * as API from "../../../apis/payrollFiles"; +import { WeaTableNew } from "comsMobx"; +import { Button, Spin } from "antd"; +import { toJS } from "mobx"; import "./index.less"; const WeaTableComx = WeaTableNew.WeaTable; @@ -103,13 +104,23 @@ class PovitpivotChartModal extends Component { showSum: false, pageInfo }); }; + exportDataPerspective = () => { + WeaLoadingGlobal.start(); + const { id, dimensionId, dimensionValue, isShare } = this.props; + const promise = API.exportDataPerspective({ id, dimensionId, dimensionValue, isShare }); + WeaLoadingGlobal.destroy(); + }; render() { const { loading } = this.state; const { payrollFilesStore: { pivotTableStore } } = this.props; return ( + {getLabel(111, "数据透视")} + + } + scalable className="pivot-wrapper" initLoadCss visible={this.props.visible} style={{ width: "80vw", height: "80vh" }} buttons={[]} onCancel={this.props.onCancel}> diff --git a/pc4mobx/hrmSalary/util/request.js b/pc4mobx/hrmSalary/util/request.js index 821d58d6..4fd7e4e4 100644 --- a/pc4mobx/hrmSalary/util/request.js +++ b/pc4mobx/hrmSalary/util/request.js @@ -1,3 +1,5 @@ +import { WeaLoadingGlobal } from "ecCom"; + const server = window.server || ""; export const formHeaderPost = (url, method, params, header) => { if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") { @@ -34,6 +36,7 @@ export const postExportFetch = (url, params) => { } url = server + url + "?__random__=" + (new Date()).valueOf(); return fetch(url, getFetchParams("POST", params)).then(res => { + WeaLoadingGlobal.destroy(); const filename = res.headers.get("Content-Disposition").split("filename=")[1]; res.blob().then(blob => { const url = window.URL.createObjectURL(blob); From 8af1f0a79a58ed712790bfc3b745e88ffeff6d18 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, 19 Mar 2024 17:55:37 +0800 Subject: [PATCH 03/13] =?UTF-8?q?hotfix/2.12.1.2403.02=20=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=AF=BC=E5=85=A5=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doCalc/components/salaryEditCalcImport/index.js | 2 +- .../dataAcquisition/attendance/components/importDialog.js | 5 ++++- .../payrollFiles/components/salaryFileImportDialog/index.js | 2 +- .../components/standingBookCalcImportDialog.js | 2 +- .../components/welfareArchivesImportDialog/index.js | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js index 463c7df4..ce58c616 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js @@ -63,7 +63,7 @@ class Index extends Component { this.setState({ importDialog: { ...this.state.importDialog, link: this.handleExportTemp, - visible: nextProps.visible, title: nextProps.title + visible: nextProps.visible, title: nextProps.title, importResult: {} } }); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importDialog.js index bf67e4b2..72df9bde 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/importDialog.js @@ -29,7 +29,10 @@ class Index extends Component { const { hasData, importDialog } = this.state; const { params, previewUrl } = nextProps; this.setState({ - importDialog: { ...importDialog, link: this.handleExportTemp, params, previewUrl, extraPreview: params } + importDialog: { + ...importDialog, importResult: {}, link: this.handleExportTemp, + params, previewUrl, extraPreview: params + } }); } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileImportDialog/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileImportDialog/index.js index 1a60b901..313a8675 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileImportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFileImportDialog/index.js @@ -51,7 +51,7 @@ class Index extends Component { if (isExtEmp) payload = { ...payload, extSalaryArchiveList: true }; this.setState({ importDialog: { - ...this.state.importDialog, extraPreview, + ...this.state.importDialog, extraPreview, importResult: {}, link: `/api/bs/hrmsalary/salaryArchive/downloadTemplate?${convertToUrlString(payload)}` } }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/standingBookCalcImportDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/standingBookCalcImportDialog.js index 0dc97e42..fb4a2db8 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/standingBookCalcImportDialog.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/standingBookCalcImportDialog.js @@ -33,7 +33,7 @@ class StandingBookCalcImportDialog extends Component { const { data } = await API[fieldUrl](); this.setState({ importDialog: { - ...this.state.importDialog, link: this.handleExportTemp, title: getLabel(24023, "数据导入") + ...this.state.importDialog, importResult: {}, link: this.handleExportTemp, title: getLabel(24023, "数据导入") }, headerFieldsDialog: { ...this.state.headerFieldsDialog, itemsByGroup: data, diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js index 149a304c..b61a17c2 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js @@ -35,7 +35,7 @@ class Index extends Component { }; this.setState({ importDialog: { - ...this.state.importDialog, + ...this.state.importDialog, importResult: {}, link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}` } }); From 272e45d3e5e734e1867cca77272cba43042ccaef 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, 20 Mar 2024 09:10:06 +0800 Subject: [PATCH 04/13] =?UTF-8?q?hotfix/2.12.1.2403.02=20=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E6=A1=A3=E6=A1=88=E8=B0=83=E8=96=AA=EF=BC=8C=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E5=B0=8F=E6=95=B0=E4=BD=8D=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salaryFile/salaryArchiveEditAdjLogRecord.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js index a091c42f..a46b7129 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryArchiveEditAdjLogRecord.js @@ -63,7 +63,8 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { salaryArchiveItemDetail: { ...salaryArchiveItemDetail, list: _.map(salaryArchiveItemDetail.list, o => ({ - ...o, dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).dataType + ...o, dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).dataType, + pattern: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === o.salaryItem).pattern })) }, conditions: _.map(adjCondition, item => { @@ -108,7 +109,8 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { if (o.salaryItem === salaryItemId) { return { ...o, salaryBefore: data, - dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).dataType + dataType: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).dataType, + pattern: _.find(salaryArchiveItemDetail.salaryItemList, g => g.id === salaryItemId).pattern }; } return { ...o }; @@ -238,7 +240,7 @@ class SalaryArchiveEditAdjLogRecordDialog extends Component { ...o, render: (__, record) => { if (record.dataType === "number") { return this.handleChangeAdjustAfter(record, v)} />; } else { From a7e75331e1a5b220f8b1f570beb3aed9bd2e3afb 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, 21 Mar 2024 13:49:18 +0800 Subject: [PATCH 05/13] =?UTF-8?q?hotfix/2.12.1.2403.02=201=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=91=E6=94=BE-=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E8=AF=A6=E6=83=85-=E9=AB=98=E7=BA=A7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=20=E9=83=A8=E9=97=A8=E8=83=BD=E5=A4=9A=E9=80=89?= =?UTF-8?q?=EF=BC=8C=20=E5=A4=9A=E9=80=89=E5=88=86=E9=83=A8=202=E3=80=81?= =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=9A?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E7=BC=B4=E7=BA=B3=E3=80=81=E8=A1=A5=E7=BC=B4?= =?UTF-8?q?=E3=80=81=E9=80=80=E5=B7=AE=E3=80=81=E8=A1=A5=E5=B7=AE=20?= =?UTF-8?q?=E9=AB=98=E7=BA=A7=E6=90=9C=E7=B4=A2=E5=A2=9E=E5=8A=A0=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=AD=9B=E9=80=89=EF=BC=8C=E5=A4=9A=E5=88=86=E9=83=A8?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/payrollDetail/index.js | 9 ++++- .../components/makeupDifference.js | 4 +- .../standingBookDetail/components/normal.js | 39 ++++++++++++++----- .../standingBookDetail/components/regTop.js | 30 ++++++++++---- .../components/regression.js | 39 ++++++++++--------- pc4mobx/hrmSalary/stores/payroll.js | 6 ++- 6 files changed, 86 insertions(+), 41 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index 6e6479c0..efa982db 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -87,9 +87,14 @@ export default class PayrollDetail extends React.Component { const { child, ...extraParams } = extra; const salarySendId = getQueryString("id"); const { payrollStore } = this.props; - const { detailListConditionForm: form } = payrollStore; - const payload = { salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams() }; + const { detailListConditionForm: form, setDetailListShowSearchAd } = payrollStore; + const payload = { + salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams(), + departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [], + subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : [] + }; this.setState({ loading: true }); + setDetailListShowSearchAd(false) getPayrollDetailList(payload).then(({ status, data }) => { this.setState({ loading: false }); if (status) { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js index 9ff5fb28..d0085fd7 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js @@ -62,6 +62,8 @@ class MakeupDifference extends Component { const { importDiffModal, addPersonalDialog } = this.state; const name = this.regTopRef.state.name; const workcode = this.regTopRef.state.workcode; + const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : []; + const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : []; const billMonth = getQueryString("billMonth"); const paymentOrganization = getQueryString("paymentOrganization"); switch (key) { @@ -85,7 +87,7 @@ class MakeupDifference extends Component { window.open(url, "_self"); break; case "search": - this.diffListRef.recessionList({ userName: name, workcode, current: 1 }); + this.diffListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 }); break; case "add": this.setState({ diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 45f1a728..d7366471 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -5,9 +5,9 @@ * LastEditTime: 2022-06-29 09:53:36 */ import React, { Component } from "react"; -import { Button, Icon, message, Modal, Spin, Tooltip } from "antd"; +import { Button, Col, Icon, message, Modal, Row, Spin, Tooltip } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaFormItem, WeaInput, WeaSearchGroup, WeaTab } from "ecCom"; +import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom"; import { calcPageNo } from "../../../../util"; import { getQueryString } from "../../../../util/url"; import ProgressModal from "../../../../components/progressModal"; @@ -19,6 +19,7 @@ import SupplementarySlide from "./supplementarySlide"; import _ from "lodash"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("standingBookStore") @observer export default class NormalIndex extends Component { @@ -44,6 +45,8 @@ export default class NormalIndex extends Component { }, searchValue: "", workcode: "", + departmentIds: "", + subCompanyIds: "", progressVisible: false, progress: 0, fieldData: {}, //选中的表单头信息 @@ -149,14 +152,18 @@ export default class NormalIndex extends Component { current: 1, paymentOrganization, userName: this.state.searchValue, - workcode: this.state.workcode + workcode: this.state.workcode, + departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [], + subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : [] }) : this.getSupplementaryList({ billMonth, current: 1, paymentOrganization, userName: this.state.searchValue, - workcode: this.state.workcode + workcode: this.state.workcode, + departmentIds: this.state.departmentIds ? this.state.departmentIds.split(",") : [], + subCompanyIds: this.state.subCompanyIds ? this.state.subCompanyIds.split(",") : [] }); }; @@ -445,12 +452,24 @@ export default class NormalIndex extends Component { }; getSearchs = () => { return - - this.setState({ workcode: v })} - /> - + + + this.setState({ workcode: v })} + /> + + + this.setState({ departmentIds: v })}/> + + + this.setState({ subCompanyIds: v })}/> + + ; }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js index 72acc3f1..0c6de7cc 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; -import { Button } from "antd"; -import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom"; +import { Button, Col, Row } from "antd"; +import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTab } from "ecCom"; import { getQueryString } from "../../../../util/url"; const getLabel = WeaLocaleProvider.getLabel; @@ -11,6 +11,8 @@ class RegTop extends Component { this.state = { name: "", workcode: "", + departmentIds: "", + subCompanyIds: "", showSearchAd: false }; } @@ -56,12 +58,24 @@ class RegTop extends Component { }; getSearchs = () => { return - - this.setState({ workcode: v })} - /> - + + + this.setState({ workcode: v })} + /> + + + this.setState({ departmentIds: v })}/> + + + this.setState({ subCompanyIds: v })}/> + + ; }; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index 4b4e790d..3b35e57e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -6,7 +6,6 @@ */ import React, { Component } from "react"; import { message, Modal } from "antd"; -import { WeaNewScroll } from "ecCom"; import RegTop from "./regTop"; import RegList from "./regList"; import RegAddEmployee from "./regAddEmployee"; @@ -75,6 +74,8 @@ class Regression extends Component { const { returnPersonModal } = this.state; const name = this.regTopRef.state.name; const workcode = this.regTopRef.state.workcode; + const departmentIds = this.regTopRef.state.departmentIds ? this.regTopRef.state.departmentIds.split(",") : []; + const subCompanyIds = this.regTopRef.state.subCompanyIds ? this.regTopRef.state.subCompanyIds.split(",") : []; const billMonth = getQueryString("billMonth"); const creator = Number(getQueryString("creator")); const paymentOrganization = getQueryString("paymentOrganization"); @@ -98,7 +99,7 @@ class Regression extends Component { window.open(url, "_self"); break; case "search": - this.regListRef.recessionList({ userName: name, workcode, current: 1 }); + this.regListRef.recessionList({ userName: name, workcode, departmentIds, subCompanyIds, current: 1 }); break; default: break; @@ -136,23 +137,23 @@ class Regression extends Component { />
{/**/} - this.regListRef = dom} - visible={returnPersonModal.visible} - onChangeRowkey={(selectKey) => this.setState({ selectKey })} - onEdit={this.handleEdit} - /> - {/*编辑弹框*/} - - {/* 弹框 */} - this.regEmmployeeRef = dom} - {...returnPersonModal} - loading={loading} - onCancel={this.handleCloseModal} - onSave={this.handleSave} - /> + this.regListRef = dom} + visible={returnPersonModal.visible} + onChangeRowkey={(selectKey) => this.setState({ selectKey })} + onEdit={this.handleEdit} + /> + {/*编辑弹框*/} + + {/* 弹框 */} + this.regEmmployeeRef = dom} + {...returnPersonModal} + loading={loading} + onCancel={this.handleCloseModal} + onSave={this.handleSave} + /> {/**/}
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index e170d4fc..4da841d0 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -453,7 +453,11 @@ export class payrollStore { @action getInfoList = (params = {}) => { let form = this.grantListConditionForm.getFormParams(); - params = { ...form, ...params }; + params = { + ...form, ...params, + departmentIds: form.departmentIds ? form.departmentIds.split(",") : [], + subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : [] + }; API.getInfoList(params).then(res => { if (res.status) { this.salaryGrantTableStore = res.data.columns; From c51c93c8122f0058fd7fffb66f256126f7acf054 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, 25 Mar 2024 17:23:42 +0800 Subject: [PATCH 06/13] =?UTF-8?q?hotfix/2.12.1.2403.02=20=E8=B0=83?= =?UTF-8?q?=E8=96=AA=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryFile/index.less | 4 +++- pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.less b/pc4mobx/hrmSalary/pages/salaryFile/index.less index ebc4a8a4..ac388b47 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.less +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.less @@ -169,10 +169,12 @@ } .adjustItem-layout { - .ant-table-fixed td { + .ant-table-fixed-left td > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + width: 100px; + display: inline-block; } } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index 13706751..97bb8519 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -4,6 +4,7 @@ import { WeaLocaleProvider, WeaTable } from "ecCom"; import { inject, observer } from "mobx-react"; import { deleteSalaryItem } from "../../apis/archive"; import SalaryArchiveEditAdjLogRecord from "./salaryArchiveEditAdjLogRecord"; +import "./index.less"; const { getLabel } = WeaLocaleProvider; @inject("salaryFileStore") 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 07/13] =?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 08/13] =?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 ( +
+ +