From 2261cf310408424329a426ca50a65cf3a9b74b89 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 10:31:10 +0800 Subject: [PATCH 01/12] release/2.17.1.2411.01 --- .../analysisOfSalaryStatistics/components/salaryDetails.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js index cbc72a7c..a45cee0f 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryDetails.js @@ -177,8 +177,9 @@ class SalaryDetails extends Component { } }); converCheckedCol = (data) => { + const { salaryDetailShowType } = this.props; return _.reduce(data.checked || [], (pre, cur) => { - const item = _.find(data.setting, k => (k.id === cur) || (k.column === cur.column)); + const item = _.find(data.setting, k => (salaryDetailShowType !== "1" && k.id === cur) || (salaryDetailShowType === "1" && k.column === cur.column)); if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }]; return pre; }, []); From 8a0998e26c50c495376042708c767bceb2c20d68 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 10:54:33 +0800 Subject: [PATCH 02/12] release/2.17.1.2411.01 --- .../CustomBrowser/components/customBrowserMutiRight.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js index a77e6e4d..d8a69b3e 100644 --- a/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js +++ b/pc4mobx/hrmSalary/components/CustomBrowser/components/customBrowserMutiRight.js @@ -75,9 +75,9 @@ class CustomBrowserMutiRight extends Component { const targetNode = obj.node.props.eventKey; const result = []; this.nodeIds.filter((item) => { - return dragNodes.indexOf(item) === -1; + return dragNodes.indexOf(String(item)) === -1; }).forEach((id) => { - if (id === targetNode) { + if (String(id) === targetNode) { dragNodes.forEach((drag) => { result.push(this.nodeObj[drag]); }); From a5cc09a2c5569e9febc9cdf974304b69ac95bde3 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 20 Nov 2024 16:25:59 +0800 Subject: [PATCH 03/12] release/2.17.1.2411.01 --- .../components/salaryFileDialog/index.js | 36 ++++++++++--------- pc4mobx/hrmSalary/util/index.js | 7 +--- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js index 7813cde7..90cc4633 100644 --- a/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js +++ b/pc4mobx/hrmSalary/pages/variableSalary/components/salaryFileDialog/index.js @@ -46,29 +46,20 @@ class Index extends Component { ...item, items: _.map(item.items, o => { if (getKey(o) === "taxAgentIds") { return { - ...o, - viewAttr: !_.isEmpty(detail) ? 1 : 3, - label: getLabel(o.lanId, o.label), + ...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "", options: _.map(taxAgentOption, (o, i) => ({ key: o.id, showname: o.content })) }; } return { - ...o, - viewAttr: !_.isEmpty(detail) ? 1 : 3, - label: getLabel(o.lanId, o.label), + ...o, viewAttr: !_.isEmpty(detail) ? 1 : 3, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "" }; }) })), { items: _.map(data, o => ({ - conditionType: "INPUT", - domkey: [String(o.id)], - fieldcol: 14, - label: o.name, - labelcol: 6, - value: detail[`${String(o.id)}_variableItem`] || "", - viewAttr: 2 + conditionType: "INPUT", domkey: [String(o.id)], fieldcol: 14, label: o.name, labelcol: 6, + value: detail[`${String(o.id)}_variableItem`] || "", viewAttr: 2, dataType: o.dataType })), title: "", col: 2, defaultshow: true }] }, () => { @@ -76,8 +67,7 @@ class Index extends Component { if (!_.isEmpty(detail)) { VSSalaryFileForm.updateFields({ employeeId: { - value: detail["employeeId"], - valueSpan: detail["username"], + value: detail["employeeId"], valueSpan: detail["username"], valueObj: [{ id: detail["employeeId"], name: detail["username"] }] } }); @@ -128,6 +118,19 @@ class Index extends Component { ; }; + handleChange = (formVal) => { + const key = _.keys(formVal)[0], value = formVal[key].value; + const [__, fields] = this.state.conditions, { items } = fields; + _.forEach(items, o => { + if (getKey(o) === key && o.dataType === "number") { + if (_.isNaN(Number(value))) { + const { baseTableStore: { VSSalaryFileForm } } = this.props; + message.warning(getLabel(111, "数值类型有误!")); + VSSalaryFileForm.updateFields({ [getKey(o)]: { value: "" } }); + } + } + }); + }; render() { const { conditions } = this.state; @@ -135,7 +138,8 @@ class Index extends Component { return ( onClose()} top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()} - content={
{getSearchs(VSSalaryFileForm, conditions, 2, false)}
} + content={
{getSearchs(VSSalaryFileForm, conditions, 2, false, this.handleChange)}
} />); } } diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index 0ce4532f..a7be61b0 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -43,12 +43,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void tipPosition="bottom" // 错误提示的显示位置: top/bottom className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames} > - + { fields.helpfulTitle && 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 04/12] 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 05/12] 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 06/12] 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 07/12] 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 08/12] 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 09/12] 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 10/12] 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 11/12] 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 12/12] 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: "" } });