From dda961cacf667197e0a766320c95131f3406bc9e Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 25 Nov 2024 17:51:49 +0800 Subject: [PATCH 01/15] release/2.17.1.2411.01 --- .../components/salaryDetails.js | 46 ++++++++++--------- .../pages/analysisOfSalaryStatistics/index.js | 7 +-- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index a45cee0f..b982d9fe 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -5,7 +5,6 @@ * Date: 2024/3/26 */ import React, { Component } from "react"; -import { toJS } from "mobx"; import { inject, observer } from "mobx-react"; import { WeaTableNew } from "comsMobx"; import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom"; @@ -34,7 +33,8 @@ class SalaryDetails extends Component { pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { - visible: false, searchParamsKey: "name", dataParams: { page: "salary_details_report" }, saveLoading: false, + visible: false, searchParamsKey: "name", saveLoading: false, + dataParams: { page: "salary_details_report", defaultSetting: "0" }, completeURL: "", convertDatasource: datas => { return { listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })), @@ -127,7 +127,9 @@ class SalaryDetails extends Component { const { list: dataSource, pageNum: current, total, pageSize } = pageparams; this.setState({ columns, dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload - }, () => tableStore.getDatas(dataKey.datas)); + }, () => { + // tableStore.getDatas(dataKey.datas) + }); } }).catch(() => this.setState({ loading: false })); }; @@ -137,10 +139,11 @@ class SalaryDetails extends Component { }); }; handleExportSalaryList = (key) => { - const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; + // const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; let { selectedRowKeys, payload, columns: tempCols } = this.state; - const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); - const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; + // const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); + // const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; + const columns = _.filter(tempCols, o => o.column !== "acctTimes"); if (key === "SELECTED" && selectedRowKeys.length === 0) { message.warning(getLabel(543345, "请选择需要导出的数据!")); return; @@ -151,12 +154,13 @@ class SalaryDetails extends Component { }); }; getColumns = () => { - const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; + // const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; const { - columns: tempCols, dataSource, pageInfo, selectedRowKeys, showTotalCell, sumRow, transferDialog + columns: tempCols, dataSource, pageInfo, selectedRowKeys, showTotalCell, sumRow } = this.state; - const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); - const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; + // const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); + // const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; + const columns = _.filter(tempCols, o => o.column !== "acctTimes"); if (!_.isEmpty(columns)) { this.postMessageToChild({ dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow, @@ -170,16 +174,15 @@ class SalaryDetails extends Component { } return []; }; - handleSetDefCols = () => this.setState({ + handleSetDefCols = (params) => this.setState({ transferDialog: { ...this.state.transferDialog, completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", visible: true, - dataParams: { page: "salary_details_report" } + dataParams: { ...this.state.transferDialog.dataParams, ...params } } }); converCheckedCol = (data) => { - const { salaryDetailShowType } = this.props; return _.reduce(data.checked || [], (pre, cur) => { - const item = _.find(data.setting, k => (salaryDetailShowType !== "1" && k.id === cur) || (salaryDetailShowType === "1" && k.column === cur.column)); + const item = _.find(data.setting, k => k.column === cur.column); if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; return pre; }, []); @@ -193,8 +196,7 @@ class SalaryDetails extends Component { return; } const payload = { - page: "salary_details_report", - setting: _.map(values, o => o.id) + ...transferDialog.dataParams, setting: _.map(values, o => o.id) }; this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } }); API.savePageListSetting(payload).then(({ status, errormsg }) => { @@ -270,12 +272,12 @@ class SalaryDetails extends Component { id="atdTable" /> - + {/**/} {/*默认显示列,薪资模板列表*/} this.setState({ diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index 3b68a2b3..87deee95 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -319,8 +319,9 @@ class Index extends Component { icon: , content: getLabel(111, "显示列定制"), onClick: () => { - tableStore.setColSetVisible(true); - tableStore.tableColSet(true); + this.salaryRef.wrappedInstance.handleSetDefCols({ defaultSetting: "0" }); + // tableStore.setColSetVisible(true); + // tableStore.tableColSet(true); } } ]; @@ -332,7 +333,7 @@ class Index extends Component { dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1); (PageAndOptAuth.isChief && selectedKey === "salaryDetail") && (dropMenuDatas = [...dropMenuDatas, { key: "DEF_COLUMN", icon: , content: getLabel(111, "默认显示列"), - onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols() + onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols({ defaultSetting: "1" }) }]); return ( Date: Mon, 25 Nov 2024 18:08:50 +0800 Subject: [PATCH 02/15] release/2.17.1.2411.01 --- .../analysisOfSalaryStatistics/components/salaryDetails.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index b982d9fe..26713bd3 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -51,7 +51,7 @@ class SalaryDetails extends Component { this.setState({ showTotalCell: confCode === "1" }, () => { - this.getSalaryList(this.props); + // this.getSalaryList(this.props); this.getPageListTemplatelist(); }); window.addEventListener("message", this.handleReceive, false); @@ -85,7 +85,8 @@ class SalaryDetails extends Component { const { type, payload: { id, params } = {} } = data; const { pageInfo } = this.state; if (type === "init") { - this.getColumns(); + // this.getColumns(); + this.getSalaryList(this.props); } else if (type === "turn") { if (id === "PAGEINFO") { const { pageNum: current, size: pageSize } = params; @@ -129,6 +130,7 @@ class SalaryDetails extends Component { columns, dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload }, () => { // tableStore.getDatas(dataKey.datas) + this.getColumns(); }); } }).catch(() => this.setState({ loading: false })); From a048a561a5430c0177b1325c7d1857a7d3d0053f Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 26 Nov 2024 14:56:03 +0800 Subject: [PATCH 03/15] release/2.17.1.2411.01 --- pc4mobx/hrmSalary/apis/statistics.js | 4 ++++ .../components/customTransferDialog.js | 8 +++++--- .../components/salaryDetails.js | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 929f41b9..71166256 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -150,3 +150,7 @@ export const getPageListTemplatelist = (params) => { export const changePageListTemplate = (params) => { return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params); }; +//薪酬统计报表-重置自定义列 +export const resetPageListSetting = (params) => { + return postFetch("/api/bs/hrmsalary/common/pageList/reset/setting", params); +}; diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 94aaad3f..9a4d8b2a 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -139,7 +139,7 @@ class CustomTransferDialog extends Component { render() { const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; - const { searchParamsKey, saveLoading } = this.props; + const { searchParamsKey, saveLoading, btns = [] } = this.props; const buttons = [ , @@ -188,7 +188,9 @@ class CustomTransferDialog extends Component { data={rightDatas} checkedKeys={rightCheckedKeys} checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })} onDoubleClick={this.onRightDoubleClick} - onDrag={(data) => {this.setState({rightDatas: data})}} + onDrag={(data) => { + this.setState({ rightDatas: data }); + }} /> @@ -199,7 +201,7 @@ class CustomTransferDialog extends Component { className="custom_browser_dialog" draggable={false} style={{ width: 784, height: 460, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" - }} buttons={buttons}>{dom} + }} buttons={[...btns, ...buttons]}>{dom} ); } } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 26713bd3..06958950 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaTableNew } from "comsMobx"; import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom"; -import { message, Spin } from "antd"; +import { Button, message, Spin } from "antd"; import { getIframeParentHeight } from "../../../util"; import { sysConfCodeRule } from "../../../apis/ruleconfig"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; @@ -17,6 +17,7 @@ import { MonthRangePicker } from "../../reportView/components/statisticalMicroSe import AdvanceInputBtn from "../components/advanceInputBtn"; import SearchPannel from "../components/searchPannel"; import * as API from "../../../apis/statistics"; +import { resetPageListSetting } from "../../../apis/statistics"; import cs from "classnames"; import "../index.less"; @@ -236,6 +237,18 @@ class SalaryDetails extends Component { }); }); }; + resetColsSetting = () => { + resetPageListSetting({ page: "salary_details_report" }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ + transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } + }, () => this.getSalaryList()); + } else { + message.error(errormsg); + } + }); + }; render() { const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId } = this.state; @@ -282,6 +295,8 @@ class SalaryDetails extends Component { {/*/>*/} {/*默认显示列,薪资模板列表*/} {getLabel(111, "重置")}]} onCancel={() => this.setState({ transferDialog: { ...transferDialog, completeURL: "", visible: false, type: "default" From 9618a9b5d3727f682695cd054aa1ffd12a216e59 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 26 Nov 2024 17:01:50 +0800 Subject: [PATCH 04/15] release/2.17.1.2411.01 --- .../CustomBrowser/components/customTransferDialog.js | 3 ++- .../analysisOfSalaryStatistics/components/salaryDetails.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 9a4d8b2a..7bcf1f88 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -143,6 +143,7 @@ class CustomTransferDialog extends Component { const buttons = [ , + ...btns, ]; let rightActive = false, leftActive = false, rightAllActive = false; if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true; @@ -201,7 +202,7 @@ class CustomTransferDialog extends Component { className="custom_browser_dialog" draggable={false} style={{ width: 784, height: 460, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" - }} buttons={[...btns, ...buttons]}>{dom} + }} buttons={buttons}>{dom} ); } } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 06958950..654d9d26 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -253,6 +253,7 @@ class SalaryDetails extends Component { render() { const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId } = this.state; const { attendanceStore: { tableStore }, dateRange, showSearchAd, salaryDetailShowType } = this.props; + const { dataParams: { defaultSetting } } = transferDialog; return (
{ @@ -295,8 +296,9 @@ class SalaryDetails extends Component { {/*/>*/} {/*默认显示列,薪资模板列表*/} {getLabel(111, "重置")}]} + btns={defaultSetting === "0" ? + [] : []} onCancel={() => this.setState({ transferDialog: { ...transferDialog, completeURL: "", visible: false, type: "default" From e613772041fac4a0039dfd052ae798655042851e Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 27 Nov 2024 10:21:51 +0800 Subject: [PATCH 05/15] release/2.17.1.2411.01 --- .../components/salaryDetails.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 654d9d26..f1028811 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -32,7 +32,7 @@ class SalaryDetails extends Component { this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {}, pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", - showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, + showTotalCell: false, updateSum: false, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, dataParams: { page: "salary_details_report", defaultSetting: "0" }, @@ -49,11 +49,8 @@ class SalaryDetails extends Component { async componentDidMount() { const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); - this.setState({ - showTotalCell: confCode === "1" - }, () => { - // this.getSalaryList(this.props); - this.getPageListTemplatelist(); + this.setState({ showTotalCell: confCode === "1" }, () => { + this.props.salaryDetailShowType === "1" && this.getPageListTemplatelist(); }); window.addEventListener("message", this.handleReceive, false); window.addEventListener("resize", () => this.forceUpdate(), false); @@ -84,16 +81,16 @@ class SalaryDetails extends Component { }; handleReceive = ({ data }) => { const { type, payload: { id, params } = {} } = data; - const { pageInfo } = this.state; + const { pageInfo, showTotalCell } = this.state; if (type === "init") { // this.getColumns(); this.getSalaryList(this.props); + showTotalCell && this.getSalaryListSum(); } else if (type === "turn") { if (id === "PAGEINFO") { const { pageNum: current, size: pageSize } = params; this.setState({ - pageInfo: { ...pageInfo, current, pageSize }, - updateSum: false + pageInfo: { ...pageInfo, current, pageSize }, updateSum: false }, () => this.getSalaryList(this.props)); } else if (id === "CHECKBOX") { const { selectedRowKeys: checkBox } = params; From 8786ef1f2aea84f153be8381829a49537607283d Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 27 Nov 2024 10:32:21 +0800 Subject: [PATCH 06/15] release/2.17.1.2411.01 --- .../analysisOfSalaryStatistics/components/salaryDetails.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index f1028811..219b5e4f 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -32,7 +32,7 @@ class SalaryDetails extends Component { this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {}, pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", - showTotalCell: false, updateSum: false, tempDialog: { visible: false, setting: [], id: "", template: {} }, + showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, dataParams: { page: "salary_details_report", defaultSetting: "0" }, @@ -81,11 +81,10 @@ class SalaryDetails extends Component { }; handleReceive = ({ data }) => { const { type, payload: { id, params } = {} } = data; - const { pageInfo, showTotalCell } = this.state; + const { pageInfo } = this.state; if (type === "init") { // this.getColumns(); this.getSalaryList(this.props); - showTotalCell && this.getSalaryListSum(); } else if (type === "turn") { if (id === "PAGEINFO") { const { pageNum: current, size: pageSize } = params; @@ -135,7 +134,7 @@ class SalaryDetails extends Component { }; getSalaryListSum = (payload) => { API.getSalaryListSum(payload).then(({ status, data }) => { - if (status) this.setState({ sumRow: data.sumRow }); + if (status) this.setState({ sumRow: data.sumRow }, () => this.getColumns()); }); }; handleExportSalaryList = (key) => { From ce4c2a7c72290b6b0ad82b230b857f3928415484 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 27 Nov 2024 10:59:24 +0800 Subject: [PATCH 07/15] release/2.17.1.2411.01 --- .../doCalc/components/salaryCalcPersonConfirm/index.js | 6 +++--- .../pages/ledgerPage/components/ledgerSalaryItemAddModal.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js index e06144ba..56cbb675 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js @@ -73,7 +73,7 @@ class Index extends Component { }, () => { const { calculateStore: { PCSearchForm } } = this.props; PCSearchForm.initFormFields(this.state.searchConditions); - this.queryPCList(); + this.handleRefresh(true); }); } @@ -185,13 +185,13 @@ class Index extends Component { } }); }; - handleRefresh = () => { + handleRefresh = (init = false) => { if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const { routeParams: { salaryAcctRecordId } } = this.props; refreshAcctemployee({ salaryAcctRecordId }).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "操作成功!")); + !init && message.success(getLabel(111, "操作成功!")); this.queryPCList(); } else { message.error(errormsg); diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index 774269f5..f340fb3e 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -114,6 +114,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { ...pageInfo, showTotal: total => `共 ${total} 条`, showQuickJumper: true, + showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], onChange: current => { this.setState({ From b0b67230ced308c1056cbb554250b2f9622031c3 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 27 Nov 2024 14:42:04 +0800 Subject: [PATCH 08/15] release/2.17.1.2411.01 --- pc4mobx/hrmSalary/components/PersonalScopeModal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index b51b5a63..935e1e00 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -168,7 +168,7 @@ class PersonalScopeModal extends Component { break; case "SQL": return
- this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/> }/>
; From 154d69d850a22413ffd3dcb96d27d9d1c53aa000 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 27 Nov 2024 14:49:03 +0800 Subject: [PATCH 09/15] release/2.17.1.2411.01 --- .../pages/variableSalary/components/salaryFileDialog/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js index 90cc4633..8e9d740e 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js @@ -123,7 +123,7 @@ class Index extends Component { const [__, fields] = this.state.conditions, { items } = fields; _.forEach(items, o => { if (getKey(o) === key && o.dataType === "number") { - if (_.isNaN(Number(value))) { + if (_.isNaN(Number(value)) || value.indexOf(" ") !== -1) { const { baseTableStore: { VSSalaryFileForm } } = this.props; message.warning(getLabel(111, "数值类型有误!")); VSSalaryFileForm.updateFields({ [getKey(o)]: { value: "" } }); From 373e0933215fdbfaee1cd45ef155ec7940cbbac8 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 3 Dec 2024 17:01:12 +0800 Subject: [PATCH 10/15] release/2.17.1.2411.01 --- .../doCalc/components/salaryCalcPersonConfirm/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js index 56cbb675..e06144ba 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js @@ -73,7 +73,7 @@ class Index extends Component { }, () => { const { calculateStore: { PCSearchForm } } = this.props; PCSearchForm.initFormFields(this.state.searchConditions); - this.handleRefresh(true); + this.queryPCList(); }); } @@ -185,13 +185,13 @@ class Index extends Component { } }); }; - handleRefresh = (init = false) => { + handleRefresh = () => { if (!this.handleDebounce) { this.handleDebounce = _.debounce(() => { const { routeParams: { salaryAcctRecordId } } = this.props; refreshAcctemployee({ salaryAcctRecordId }).then(({ status, errormsg }) => { if (status) { - !init && message.success(getLabel(111, "操作成功!")); + message.success(getLabel(111, "操作成功!")); this.queryPCList(); } else { message.error(errormsg); From b61dc20db51018340dfe37ca82cd2e24a5759a39 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 3 Dec 2024 18:38:14 +0800 Subject: [PATCH 11/15] =?UTF-8?q?feature/2.17.1.2411.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customTransferDialog.js | 15 ++-- .../components/salaryDetails.js | 73 ++++++++----------- .../pages/analysisOfSalaryStatistics/index.js | 20 ++--- .../hrmSalary/pages/ruleConfig/conditions.js | 20 ++--- 4 files changed, 53 insertions(+), 75 deletions(-) diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 7bcf1f88..25957acb 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -133,18 +133,19 @@ class CustomTransferDialog extends Component { renderTitle = () => { return (
{getLabel(111, "数据选择")} -
+
{this.props.titleOptsComs}
); }; render() { const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; - const { searchParamsKey, saveLoading, btns = [] } = this.props; - const buttons = [ - , - ...btns, - ]; + const { + searchParamsKey, saveLoading, buttons = [ + , + + ] + } = this.props; let rightActive = false, leftActive = false, rightAllActive = false; if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true; if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 219b5e4f..26e67c3c 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -35,7 +35,7 @@ class SalaryDetails extends Component { showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, - dataParams: { page: "salary_details_report", defaultSetting: "0" }, + dataParams: { page: "salary_details_report" }, completeURL: "", convertDatasource: datas => { return { listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })), @@ -49,9 +49,7 @@ class SalaryDetails extends Component { async componentDidMount() { const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); - this.setState({ showTotalCell: confCode === "1" }, () => { - this.props.salaryDetailShowType === "1" && this.getPageListTemplatelist(); - }); + this.setState({ showTotalCell: confCode === "1" }); window.addEventListener("message", this.handleReceive, false); window.addEventListener("resize", () => this.forceUpdate(), false); } @@ -73,8 +71,7 @@ class SalaryDetails extends Component { if (status) { this.setState({ tempPageList: _.map(data, o => ({ ...o, key: String(o.id), showname: o.name })), - templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : "", - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } + templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : "" }); } }); @@ -173,12 +170,13 @@ class SalaryDetails extends Component { } return []; }; - handleSetDefCols = (params) => this.setState({ + handleSetDefCols = (params = {}) => this.setState({ transferDialog: { - ...this.state.transferDialog, completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", visible: true, - dataParams: { ...this.state.transferDialog.dataParams, ...params } + ...this.state.transferDialog, visible: true, type: "temp", + dataParams: { ...this.state.transferDialog.dataParams, ...params }, + completeURL: "/api/bs/hrmsalary/common/pageList/template/get" } - }); + }, () => this.getPageListTemplatelist()); converCheckedCol = (data) => { return _.reduce(data.checked || [], (pre, cur) => { const item = _.find(data.setting, k => k.column === cur.column); @@ -186,14 +184,9 @@ class SalaryDetails extends Component { return pre; }, []); }; + savePageListSetting = (values) => { - const { transferDialog, tempDialog } = this.state, { type } = transferDialog; - if (type === "temp") { - this.setState({ - tempDialog: { ...tempDialog, visible: true, setting: _.map(values, o => o.id) } - }); - return; - } + const { transferDialog } = this.state; const payload = { ...transferDialog.dataParams, setting: _.map(values, o => o.id) }; @@ -211,13 +204,8 @@ class SalaryDetails extends Component { }); }; handelAddTemp = (templateId) => { - const { transferDialog, tempDialog, tempPageList } = this.state; + const { tempDialog, tempPageList } = this.state; this.setState({ - transferDialog: { - ...transferDialog, visible: true, type: "temp", - dataParams: { ...transferDialog.dataParams, id: templateId }, - completeURL: "/api/bs/hrmsalary/common/pageList/template/get" - }, tempDialog: { ...tempDialog, id: templateId, template: _.find(tempPageList, o => o.key === templateId) } }); }; @@ -226,7 +214,15 @@ class SalaryDetails extends Component { API.changePageListTemplate({ page: "salary_details_report", templateId }).then(({ status, errormsg }) => { if (status) { message.success(getLabel(111, "操作成功!")); - this.getSalaryList(); + this.setState({ + transferDialog: { + ...this.state.transferDialog, + dataParams: { ...this.state.transferDialog.dataParams, id: templateId } + } + }, () => { + this.transferRef.getData(true); + this.getSalaryList(); + }); } else { message.error(errormsg); } @@ -252,21 +248,6 @@ class SalaryDetails extends Component { const { dataParams: { defaultSetting } } = transferDialog; return (
- { - salaryDetailShowType === "1" && -
- - { - templateId && - this.handelAddTemp(templateId)}> - - - } -
- } @@ -291,10 +272,16 @@ class SalaryDetails extends Component { {/* columns={this.getColumns()}*/} {/*/>*/} {/*默认显示列,薪资模板列表*/} - {getLabel(111, "恢复默认显示列")}] : []} + this.transferRef = dom} + buttons={[ + , + + ]} + titleOptsComs={ + } onCancel={() => this.setState({ transferDialog: { ...transferDialog, completeURL: "", visible: false, type: "default" diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js index 87deee95..f7c2ca7a 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js @@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react"; import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom"; import { Button, Dropdown, Menu } from "antd"; import { condition, reportCondition } from "./components/conditions"; -import { commonEnumList, reportGetForm, sysinfo } from "../../apis/ruleconfig"; +import { commonEnumList, reportGetForm } from "../../apis/ruleconfig"; import { dimensionGetForm } from "../../apis/statistics"; import EmployeeDetails from "./components/employeeDetails"; import SalaryDetails from "./components/salaryDetails"; @@ -50,16 +50,12 @@ class Index extends Component { title: "", visible: false, typeKey: "", id: "" }, - logDialogVisible: false, filterConditions: "[]", - salaryDetailShowType: "0" //薪资明细列表显示方式 + logDialogVisible: false, filterConditions: "[]" }; } componentDidMount() { this.initReportFormCondition(); - sysinfo().then(({ status, data }) => { - if (status) this.setState({ salaryDetailShowType: data.SALARY_DETAILS_REPORT_SHOW_TYPE }); - }); } initReportFormCondition = (payload = {}) => { @@ -281,7 +277,7 @@ class Index extends Component { const { selectedKey, modalReq, slideReq, conditions, reportConditions, reportName, keyword, year, logDialogVisible, filterConditions, - dateRange, showSearchAd, isQuery, salaryDetailShowType + dateRange, showSearchAd, isQuery } = this.state; const buttons = selectedKey === "statistics" ? [ , @@ -319,7 +315,7 @@ class Index extends Component { icon: , content: getLabel(111, "显示列定制"), onClick: () => { - this.salaryRef.wrappedInstance.handleSetDefCols({ defaultSetting: "0" }); + this.salaryRef.wrappedInstance.handleSetDefCols(); // tableStore.setColSetVisible(true); // tableStore.tableColSet(true); } @@ -331,18 +327,13 @@ class Index extends Component { { key: "salaryDetail", title: getLabel(111, "薪资明细") } ]; dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1); - (PageAndOptAuth.isChief && selectedKey === "salaryDetail") && (dropMenuDatas = [...dropMenuDatas, { - key: "DEF_COLUMN", icon: , content: getLabel(111, "默认显示列"), - onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols({ defaultSetting: "1" }) - }]); return ( } selectedKey={selectedKey} iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10} onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())} - showDropIcon={(selectedKey === "statistics") || (selectedKey === "salaryDetail" && salaryDetailShowType !== "1")} - onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}> + showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}> { selectedKey === "statistics" ? this.onDropMenuClick(type, targetid)} /> : this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery} - salaryDetailShowType={salaryDetailShowType} showSearchAd={showSearchAd} handleOpenAdvanceSearch={this.handleOpenAdvanceSearch} handleAdvanceSearch={this.handleAdvanceSearch} onAdSearch={this.onAdSearch} onCancel={() => this.setState({ showSearchAd: false })} diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js index 22135a29..51759130 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js @@ -215,16 +215,16 @@ export const conditions = [ labelcol: 8, viewAttr: 2 }, - { - conditionType: "SELECT", - domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"], - fieldcol: 10, - label: "薪资明细显示模式", - lanId: 111, - options: [], - labelcol: 8, - viewAttr: 2 - } + // { + // conditionType: "SELECT", + // domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"], + // fieldcol: 10, + // label: "薪资明细显示模式", + // lanId: 111, + // options: [], + // labelcol: 8, + // viewAttr: 2 + // } ], title: "薪资报表", lanId: 111, From f771d2eaccfc615ab7e1c940743005c83d5bab7f Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 4 Dec 2024 10:46:25 +0800 Subject: [PATCH 12/15] =?UTF-8?q?feature/2.17.1.2411.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customTransferDialog.js | 49 +++++++++-- .../components/CustomBrowser/index.less | 14 ++++ .../components/salaryDetails.js | 82 ++++++++++--------- .../components/salaryTempMangerDialog.js | 22 +++++ 4 files changed, 118 insertions(+), 49 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 25957acb..6d2a8f6f 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -8,7 +8,7 @@ * @description: */ import React, { Component } from "react"; -import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom"; +import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom"; import { Button, Col, Row, Spin } from "antd"; import CustomBrowserMutiLeft from "./customBrowserMutiLeft"; import CustomBrowserMutiRight from "./customBrowserMutiRight"; @@ -22,8 +22,8 @@ class CustomTransferDialog extends Component { constructor(props) { super(props); this.state = { - loading: false, listDatas: [], - query: { [props.searchParamsKey]: "" }, + loading: false, listDatas: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, + query: props.searchParamsKey ? { [props.searchParamsKey]: "" } : {}, leftListSelectedKeys: [], // 左侧table选择的keys leftListSelectedData: [], // 左侧table选择的数据 rightCheckedKeys: [], //右侧选择的keys @@ -50,16 +50,18 @@ class CustomTransferDialog extends Component { } getData = (init = false, props) => { - const { query } = this.state; - const { completeURL, convertDatasource, dataParams = {} } = props || this.props; + const { query, pageInfo } = this.state; + const { completeURL, convertDatasource, dataParams = {}, dialogType } = props || this.props; let payload = { ...dataParams, ...query }; + dialogType === "table" && (payload = { ...payload, ...pageInfo }); this.setState({ loading: true }); postFetch(completeURL, payload).then(({ status, data }) => { this.setState({ loading: false }); if (status && data.list) { const { pageNum: current, pageSize, total } = data; this.setState({ - listDatas: convertDatasource ? convertDatasource(data.list) : data.list + listDatas: convertDatasource ? convertDatasource(data.list) : data.list, columns: data.columns, + pageInfo: { ...pageInfo, current, pageSize, total } }); } else { this.setState({ @@ -132,15 +134,18 @@ class CustomTransferDialog extends Component { }; renderTitle = () => { return (
- {getLabel(111, "数据选择")} + {this.props.title || getLabel(111, "数据选择")}
{this.props.titleOptsComs}
); }; render() { - const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; const { - searchParamsKey, saveLoading, buttons = [ + loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys, pageInfo, selectedRowKeys, + columns + } = this.state; + const { + searchParamsKey, saveLoading, dialogType = "", rowKey, buttons = [ , @@ -197,6 +202,32 @@ class CustomTransferDialog extends Component {
; + if (dialogType === "table") { + const sheight = this.dialog ? this.dialog.state.height - 116 : 260; + 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.getData()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getData()); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; + dom =
+ +
; + } return ( this.dialog = dom} title={this.renderTitle()} diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.less b/pc4mobx/hrmSalary/components/CustomBrowser/index.less index d4d61a16..a4818c60 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/index.less +++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.less @@ -3,6 +3,20 @@ display: flex; justify-content: space-between; align-items: center; + + .wea-select, .ant-select-selection, .ant-select { + width: 100%; + } + + .wea-select { + display: inline-block; + position: relative; + } + + .ant-select-selection { + height: 30px; + border-radius: 0; + } } .wea-hr-muti-input-table { diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 26e67c3c..0c7f9b7d 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -13,11 +13,11 @@ import { getIframeParentHeight } from "../../../util"; import { sysConfCodeRule } from "../../../apis/ruleconfig"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; import SalaryDetailsTempDialog from "./salaryDetailsTempDialog"; +import SalaryTempMangerDialog from "./salaryTempMangerDialog"; import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide"; import AdvanceInputBtn from "../components/advanceInputBtn"; import SearchPannel from "../components/searchPannel"; import * as API from "../../../apis/statistics"; -import { resetPageListSetting } from "../../../apis/statistics"; import cs from "classnames"; import "../index.less"; @@ -42,7 +42,11 @@ class SalaryDetails extends Component { checked: this.converCheckedCol(datas) }; }, - type: "default" + dialogType: "temp" + }, + tempManageDialog: { //模板管理 + visible: false, completeURL: "", dialogType: "table", + dataParams: { page: "salary_details_report" } } }; } @@ -172,9 +176,8 @@ class SalaryDetails extends Component { }; handleSetDefCols = (params = {}) => this.setState({ transferDialog: { - ...this.state.transferDialog, visible: true, type: "temp", - dataParams: { ...this.state.transferDialog.dataParams, ...params }, - completeURL: "/api/bs/hrmsalary/common/pageList/template/get" + ...this.state.transferDialog, visible: true, dataParams: { ...this.state.transferDialog.dataParams, ...params }, + completeURL: "/api/bs/hrmsalary/common/pageList/template/get", dialogType: "temp" } }, () => this.getPageListTemplatelist()); converCheckedCol = (data) => { @@ -196,17 +199,20 @@ class SalaryDetails extends Component { if (status) { message.success(getLabel(111, "操作成功!")); this.setState({ - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } + transferDialog: { ...this.state.transferDialog, visible: false, dialogType: "temp" } }, () => this.getSalaryList()); } else { message.error(errormsg); } }); }; - handelAddTemp = (templateId) => { + handelAddTemp = (templateId = "") => { const { tempDialog, tempPageList } = this.state; this.setState({ - tempDialog: { ...tempDialog, id: templateId, template: _.find(tempPageList, o => o.key === templateId) } + tempDialog: { + ...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id) + // template: _.find(tempPageList, o => o.key === templateId) + } }); }; changePageListTemplate = (templateId) => { @@ -229,23 +235,11 @@ class SalaryDetails extends Component { }); }); }; - resetColsSetting = () => { - resetPageListSetting({ page: "salary_details_report" }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(111, "操作成功!")); - this.setState({ - transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } - }, () => this.getSalaryList()); - } else { - message.error(errormsg); - } - }); - }; render() { - const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId } = this.state; - const { attendanceStore: { tableStore }, dateRange, showSearchAd, salaryDetailShowType } = this.props; - const { dataParams: { defaultSetting } } = transferDialog; + const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog } = this.state; + const { dateRange, showSearchAd } = this.props; + const { dialogType } = transferDialog; return (
@@ -273,29 +267,37 @@ class SalaryDetails extends Component { {/*/>*/} {/*默认显示列,薪资模板列表*/} this.transferRef = dom} - buttons={[ - , - - ]} - titleOptsComs={ - } onCancel={() => this.setState({ - transferDialog: { - ...transferDialog, completeURL: "", visible: false, type: "default" - } - })}/> + transferDialog: { ...transferDialog, completeURL: "", visible: false } + })} + buttons={ + dialogType === "temp" ? [ + , + + ] : [] + } + titleOptsComs={ + dialogType === "temp" ? + : null + }/> {/*薪资明细模板设置*/} this.setState({ tempDialog: { ...tempDialog, visible: false, setting: [] } }, () => callback && callback())} - onSuccess={() => { - this.getPageListTemplatelist(); - this.getSalaryList(); - }}/> + onSuccess={this.getPageListTemplatelist}/> + this.setState({ + tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false } + })}/>
); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js new file mode 100644 index 00000000..cf9ea23b --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js @@ -0,0 +1,22 @@ +/* + * 薪酬报表-薪酬明细 + * 模板管理弹框 + * @Author: 黎永顺 + * @Date: 2024/12/4 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryTempMangerDialog extends Component { + render() { + return (); + } +} + +export default SalaryTempMangerDialog; From 5d817c9594f4f3d8b52076c44019d5675a512eea Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 4 Dec 2024 15:42:49 +0800 Subject: [PATCH 13/15] =?UTF-8?q?feature/2.17.1.2411.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/statistics.js | 6 +- .../components/customTransferDialog.js | 17 ++-- .../components/CustomBrowser/index.less | 13 +++ .../components/salaryDetails.js | 81 ++++++++++++------- .../components/salaryTempAdminDialog.js | 59 ++++++++++++++ .../components/salaryTempMangerDialog.js | 70 +++++++++++++++- 6 files changed, 204 insertions(+), 42 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js diff --git a/pc4mobx/hrmSalary/apis/statistics.js b/pc4mobx/hrmSalary/apis/statistics.js index 71166256..a4d16bbc 100644 --- a/pc4mobx/hrmSalary/apis/statistics.js +++ b/pc4mobx/hrmSalary/apis/statistics.js @@ -150,7 +150,7 @@ export const getPageListTemplatelist = (params) => { export const changePageListTemplate = (params) => { return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params); }; -//薪酬统计报表-重置自定义列 -export const resetPageListSetting = (params) => { - return postFetch("/api/bs/hrmsalary/common/pageList/reset/setting", params); +//薪酬统计报表-删除模板 +export const deleteTemplatePageList = (params) => { + return postFetch("/api/bs/hrmsalary/common/pageList/template/delete", params); }; diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js index 6d2a8f6f..5714241e 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customTransferDialog.js @@ -42,8 +42,9 @@ class CustomTransferDialog extends Component { } } else if (nextProps.visible !== this.props.visible && !nextProps.visible) { this.setState({ - query: { [this.props.searchParamsKey]: "" }, - rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [] + query: { [this.props.searchParamsKey]: "" }, selectedRowKeys: [], + rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [], + pageInfo: { current: 1, pageSize: 10, total: 0 } }); this.selectedData = {}; } @@ -145,7 +146,7 @@ class CustomTransferDialog extends Component { columns } = this.state; const { - searchParamsKey, saveLoading, dialogType = "", rowKey, buttons = [ + searchParamsKey, saveLoading, dialogType = "", rowKey, tableOpts = {}, buttons = [ , @@ -203,7 +204,7 @@ class CustomTransferDialog extends Component {
; if (dialogType === "table") { - const sheight = this.dialog ? this.dialog.state.height - 116 : 260; + const sheight = this.dialog ? this.dialog.state.height - 156 : 260; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -221,17 +222,19 @@ class CustomTransferDialog extends Component { }; const rowSelection = { selectedRowKeys, - onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + onChange: selectedRowKeys => this.setState({ selectedRowKeys }, () => this.props.onSelect(selectedRowKeys)) }; dom =
+ {this.props.children} + rowSelection={rowSelection} rowKey={rowKey || "id"} + columns={!_.isEmpty(tableOpts) ? [...columns, tableOpts] : columns}/>
; } return ( this.dialog = dom} title={this.renderTitle()} - className="custom_browser_dialog" draggable={false} style={{ + className="custom_browser_dialog" draggable={true} style={{ width: 784, height: 460, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" }} buttons={buttons}>{dom} diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/index.less b/pc4mobx/hrmSalary/components/CustomBrowser/index.less index a4818c60..e49d982a 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/index.less +++ b/pc4mobx/hrmSalary/components/CustomBrowser/index.less @@ -24,6 +24,19 @@ padding: 8px 16px; height: 100%; + .table_opts { + display: flex; + align-items: center; + justify-content: flex-end; + width: 100%; + height: 40px; + background: #FFF; + + .wea-button-icon { + margin-right: 10px; + } + } + .wea-new-table { background: #FFF; } diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 0c7f9b7d..352d2571 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaTableNew } from "comsMobx"; import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom"; -import { Button, message, Spin } from "antd"; +import { Button, message, Modal, Spin } from "antd"; import { getIframeParentHeight } from "../../../util"; import { sysConfCodeRule } from "../../../apis/ruleconfig"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; @@ -31,7 +31,7 @@ class SalaryDetails extends Component { super(props); this.state = { loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {}, - pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", + pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", tempManageQuery: false, showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, transferDialog: { visible: false, searchParamsKey: "name", saveLoading: false, @@ -39,14 +39,13 @@ class SalaryDetails extends Component { completeURL: "", convertDatasource: datas => { return { listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })), - checked: this.converCheckedCol(datas) + checked: converCheckedCol(datas) }; }, dialogType: "temp" }, tempManageDialog: { //模板管理 - visible: false, completeURL: "", dialogType: "table", - dataParams: { page: "salary_details_report" } + visible: false, completeURL: "", dialogType: "table", dataParams: { page: "salary_details_report" } } }; } @@ -180,13 +179,6 @@ class SalaryDetails extends Component { completeURL: "/api/bs/hrmsalary/common/pageList/template/get", dialogType: "temp" } }, () => this.getPageListTemplatelist()); - converCheckedCol = (data) => { - return _.reduce(data.checked || [], (pre, cur) => { - const item = _.find(data.setting, k => k.column === cur.column); - if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; - return pre; - }, []); - }; savePageListSetting = (values) => { const { transferDialog } = this.state; @@ -217,27 +209,46 @@ class SalaryDetails extends Component { }; changePageListTemplate = (templateId) => { this.setState({ templateId }, () => { - API.changePageListTemplate({ page: "salary_details_report", templateId }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(111, "操作成功!")); - this.setState({ - transferDialog: { - ...this.state.transferDialog, - dataParams: { ...this.state.transferDialog.dataParams, id: templateId } - } - }, () => { - this.transferRef.getData(true); - this.getSalaryList(); - }); - } else { - message.error(errormsg); - } - }); + API.changePageListTemplate({ page: "salary_details_report", templateId }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ + transferDialog: { + ...this.state.transferDialog, + dataParams: { ...this.state.transferDialog.dataParams, id: templateId } + } + }, () => { + this.transferRef.getData(true); + this.getSalaryList(); + }); + } else { + message.error(errormsg); + } + }); + }); + }; + handleDelTemp = (ids) => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确认删除吗?"), + onOk: () => { + API.deleteTemplatePageList({ ids }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ tempManageQuery: !this.state.tempManageQuery }, () => this.getPageListTemplatelist()); + } else { + message.error(errormsg); + } + }); + } }); }; render() { - const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog } = this.state; + const { + loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog, tempManageQuery + } = this.state; const { dateRange, showSearchAd } = this.props; const { dialogType } = transferDialog; return ( @@ -295,7 +306,9 @@ class SalaryDetails extends Component { tempDialog: { ...tempDialog, visible: false, setting: [] } }, () => callback && callback())} onSuccess={this.getPageListTemplatelist}/> - this.setState({ + {/*薪资明细自定义列模板管理*/} + this.setState({ tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false } })}/> @@ -305,3 +318,11 @@ class SalaryDetails extends Component { } export default SalaryDetails; + +export const converCheckedCol = (data) => { + return _.reduce(data.checked || [], (pre, cur) => { + const item = _.find(data.setting, k => k.column === cur.column); + if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; + return pre; + }, []); +}; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js new file mode 100644 index 00000000..0006cac0 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js @@ -0,0 +1,59 @@ +/* + * 薪酬报表-薪酬明细 + * 模板管理新增编辑弹框 + * @Author: 黎永顺 + * @Date: 2024/12/4 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom"; +import { postFetch } from "../../../util/request"; +import { Button } from "antd"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryTempAdminDialog extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, selectedKeys: [], dataSource: [] + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { dataParams = {} } = nextProps; + this.setState({ loading: true }); + postFetch("/api/bs/hrmsalary/common/pageList/template/get", { ...dataParams }) + .then(({ status, data }) => { + if (status) { + this.setState({ + dataSource: _.map(data.setting, o => ({ id: o.column, name: o.text })), + selectedKeys: _.map(data.checked, o => o.column) + }); + } + }); + } + } + + render() { + const { dataSource, selectedKeys } = this.state, { dataParams } = this.props; + return ( this.dialog = dom} title={getLabel(111, "模板管理")} + className="temp_admin_dialog" style={{ + width: 784, height: 460, minHeight: 200, minWidth: 380, + maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" + }} buttons={[ + , + + ]}> + this.setState({ selectedKeys: v })} + height={this.dialog ? this.dialog.state.height - 10 : 260}/> + ); + } +} + +export default SalaryTempAdminDialog; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js index cf9ea23b..5995a9c5 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js @@ -8,14 +8,80 @@ * @description: */ import React, { Component } from "react"; -import { WeaLocaleProvider } from "ecCom"; +import { WeaButtonIcon, WeaLocaleProvider } from "ecCom"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; +import SalaryTempAdminDialog from "./salaryTempAdminDialog"; +import SalaryDetailsTempDialog from "./salaryDetailsTempDialog"; const getLabel = WeaLocaleProvider.getLabel; class SalaryTempMangerDialog extends Component { + constructor(props) { + super(props); + this.state = { + selectedRowKeys: [], tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }, + tempDialog: { visible: false, setting: [], id: "", template: {} } + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.isQuery !== this.props.isQuery) this.setState({ selectedRowKeys: [] }, () => this.tempManageRef.getData()); + } + + handleTempAdminCols = (params = {}) => this.setState({ + tempAdminDialog: { visible: true, dataParams: { ...this.state.tempAdminDialog.dataParams, ...params } } + }); + handelAddTemp = (id = "", setting = []) => { + this.setState({ + tempDialog: { + visible: true, setting, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id) + } + }); + }; + render() { - return (); + const { selectedRowKeys, tempAdminDialog, tempDialog } = this.state; + return ( this.tempManageRef = dom} {...this.props} buttons={[]} + title={getLabel(111, "模板管理")} + onSelect={v => this.setState({ selectedRowKeys: v })} + tableOpts={{ + title: getLabel(111, "操作"), + dataIndex: "options", + width: 120, + render: (text, record) => ( + { + record.canEdit && + this.handleTempAdminCols({ id: record.id })} + style={{ marginRight: 10 }}>{getLabel(111, "编辑")} + } + { + record.canEdit && + this.props.onDelete([record.id])}>{getLabel(111, "删除")} + } + + ) + }}> +
+ this.handleTempAdminCols()}/> + this.props.onDelete(selectedRowKeys)} disabled={_.isEmpty(selectedRowKeys)}/> +
+ {/*模板管理*/} + this.setState({ + tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } } + })}/> + {/*薪资明细模板设置*/} + this.setState({ + tempDialog: { ...tempDialog, visible: false, setting: [] } + }, () => callback && callback())} + onSuccess={() => this.setState({ + tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } } + }, () => this.tempManageRef.getData())}/> +
); } } From 8a2891f4548ba1d00248942dd7913425292bb834 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 4 Dec 2024 17:06:29 +0800 Subject: [PATCH 14/15] release/2.17.1.2411.01 --- pc4mobx/hrmSalary/pages/calculate/doCalc/index.js | 5 ++--- .../attendance/components/attendanceDataViewSlide.js | 5 ++--- pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js | 2 ++ .../hrmSalary/pages/dataAcquisition/cumSituation/index.js | 2 ++ pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js | 2 ++ .../pages/dataAcquisition/specialAddDeduction/index.js | 2 ++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js index 4f4944c7..602e48b5 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -77,8 +77,7 @@ class Index extends Component { if (this.timer) clearInterval(this.timer); this.timer = setInterval(() => { getCalculateProgress(salaryAcctRecordId).then(({ data }) => { - let progress = data.progress; - if (progress === 1 && this.timer) { + if ((_.isNil(data) || data.progress === 1) && this.timer) { clearInterval(this.timer); this.timer = null; this.setState({ @@ -96,7 +95,7 @@ class Index extends Component { }); message.error(data.message); } - this.setState({ progress: Number(progress) * 100 }); + this.setState({ progress: Number(data.progress) * 100 }); }); }, 1000); }); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index f1e9b4fd..be64c8e8 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -41,8 +41,7 @@ class AttendanceDataViewSlide extends Component { const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo; this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, - // o.dataIndex === "username" ? "left" : - columns: _.map(columns, o => ({ ...o, width: 150, fixed: null })) + columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null })) }); } }).catch(() => this.setState({ loading: { ...loading, query: false } })); @@ -103,7 +102,7 @@ class AttendanceDataViewSlide extends Component { + loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/> } /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index e1c8e21b..867c8423 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -28,6 +28,7 @@ import TableRecord from "../components/tableRecord"; import { dataCollectCondition } from "./columns"; import { removePropertyCondition } from "../../../util/response"; import { convertToUrlString } from "../../../util/url"; +import { getDomkes } from "../../../util"; import Layout from "../layout"; import moment from "moment"; @@ -239,6 +240,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 7a0e0ea4..64cdd59e 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -27,6 +27,7 @@ import { dataCollectCondition, taxOptions } from "./columns"; import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -392,6 +393,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index f812edda..8f786982 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns"; import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -407,6 +408,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js index 70c04767..5986baae 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js @@ -20,6 +20,7 @@ import { condition } from "./components/condition"; import AddItems from "../addItems"; import TableRecord from "../components/tableRecord"; import { convertToUrlString } from "../../../util/url"; +import { getDomkes } from "../../../util"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -345,6 +346,7 @@ class Index extends Component { addForm.validateForm().then(f => { if (f.isValid) { const payload = { + ..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}), ...addForm.getFormParams(), taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname }; From 5c8f045373068ef3edde34d88836f7c9c692cd6d Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 4 Dec 2024 17:39:23 +0800 Subject: [PATCH 15/15] =?UTF-8?q?feature/2.17.1.2411.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/salaryDetails.js | 2 +- .../components/salaryDetailsTempDialog.js | 12 ++++++------ .../components/salaryTempMangerDialog.js | 5 ++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index 352d2571..657c4dfb 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -308,7 +308,7 @@ class SalaryDetails extends Component { onSuccess={this.getPageListTemplatelist}/> {/*薪资明细自定义列模板管理*/} this.setState({ + onSuccess={this.getPageListTemplatelist} onCancel={() => this.setState({ tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false } })}/> diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js index f89e5969..5fc57e80 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetailsTempDialog.js @@ -45,15 +45,15 @@ class SalaryDetailTempDialog extends Component { ...item, items: _.map(item.items, o => { if (getKey(o) === "sharedType") { return { - ...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "0", + ...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "1", options: [ - { key: "0", showname: getLabel(111, "公共") }, - { key: "1", showname: getLabel(111, "私有") } + { key: "1", showname: getLabel(111, "私有") }, + { key: "0", showname: getLabel(111, "共享") } ] }; } else if (getKey(o) === "limitIds") { return { - ...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 0), + ...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 1), value: id ? template["limitIds"].join(",") : "", options: _.map(data, o => ({ key: o.id, showname: o.content })) }; @@ -98,8 +98,8 @@ class SalaryDetailTempDialog extends Component { ...item, items: _.map(item.items, o => { if (key === "sharedType" && getKey(o) === "limitIds") { return { - ...o, hide: value !== "1", viewAttr: value === "1" ? 3 : 1, - rules: value === "1" ? "required|string" : "" + ...o, hide: value !== "0", viewAttr: value === "0" ? 3 : 1, + rules: value === "0" ? "required|string" : "" }; } return { ...o }; diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js index 5995a9c5..4f5696c9 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempMangerDialog.js @@ -80,7 +80,10 @@ class SalaryTempMangerDialog extends Component { }, () => callback && callback())} onSuccess={() => this.setState({ tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } } - }, () => this.tempManageRef.getData())}/> + }, () => { + this.props.onSuccess(); + this.tempManageRef.getData(); + })}/>
); } }