From 2fb3c8994741ef275b18a73be4e35c4f98ea6f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 26 Apr 2024 16:53:51 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.12.1.2404.02-=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E5=88=A4=E6=96=AD=E8=B4=A6=E5=A5=97=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/calculate.js | 9 ++ .../doCalc/components/salaryEditCalc/index.js | 6 +- .../components/salaryEditCalc/index.less | 27 ++++++ .../salaryEditCalc/salaryCalcLayout.js | 86 +++++++++++++++++++ 4 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/salaryCalcLayout.js diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js index 0abda464..f2bd582a 100644 --- a/pc4mobx/hrmSalary/apis/calculate.js +++ b/pc4mobx/hrmSalary/apis/calculate.js @@ -266,4 +266,13 @@ export const deleteExportTemplate = (params) => { export const getExportTemplateForm = (params) => { return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/getExportTemplateForm", params); }; +//薪资核算-薪资项目改变否 +export const getCompareSobConfig = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/compareSobConfig", "GET", params); +}; +//薪资核算-更新薪资账套 +export const updateSobConfig = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params); +}; + diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js index e3ed75a1..2b4a149d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js @@ -6,12 +6,12 @@ */ import React, { Component } from "react"; import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom"; -import { Button } from "antd"; import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate"; import { sysConfCodeRule } from "../../../../../apis/ruleconfig"; import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel"; import EditCalcTable from "./editCalcTable"; import SalaryMonthTip from "../salaryMonthTip"; +import SalaryCalcLayout from "./salaryCalcLayout"; import cs from "classnames"; import "./index.less"; @@ -57,7 +57,7 @@ class Index extends Component { const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state; const { routeParams: { salaryAcctRecordId } } = this.props; const formulaObj = _.get(columnDesc, [formulaTd]) || {}; - return ( + return (
@@ -92,7 +92,7 @@ class Index extends Component { {...this.props} showTotalCell={showTotalCell} onShowFormulaTd={this.handleShowFormulaTa}/>
- ); + ); } } diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less index 77f3e425..19d48e65 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less @@ -207,3 +207,30 @@ } } } + +.infoConfirmDialog { + .confirm-content { + width: 100%; + height: 100%; + padding: 16px; + overflow: auto; + position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + + .contract { + text-align: center; + flex-grow: 1; + flex-shrink: 1; + } + + .confirm-container { + flex-grow: 0; + flex-shrink: 0; + margin-top: 8px; + width: 100%; + + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/salaryCalcLayout.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/salaryCalcLayout.js new file mode 100644 index 00000000..1e7c24a1 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/salaryCalcLayout.js @@ -0,0 +1,86 @@ +/* + * Author: 黎永顺 + * name: 薪资核算-layout + * Description: + * Date: 2024/4/26 + */ +import React, { Component } from "react"; +import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom"; +import { Button, message } from "antd"; +import * as API from "../../../../../apis/calculate"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class SalaryCalcLayout extends Component { + constructor(props) { + super(props); + this.state = { + fieldInformationConfirm: { visible: false, data: {} }, userConfirmed: "0" + }; + } + + componentDidMount() { + this.getCompareSobConfig(); + } + + getCompareSobConfig = () => { + const { fieldInformationConfirm } = this.state; + const { routeParams: { salaryAcctRecordId: id } } = this.props; + API.getCompareSobConfig({ id }).then(({ status, data }) => { + if (status) { + this.setState({ + fieldInformationConfirm: { ...fieldInformationConfirm, visible: true } + }); + } + }); + }; + onOk = () => { + const { fieldInformationConfirm } = this.state; + const { routeParams: { salaryAcctRecordId: id } } = this.props; + API.updateSobConfig({ id }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功!")); + this.setState({ + fieldInformationConfirm: { ...fieldInformationConfirm, visible: false } + }); + } else { + message.error(errormsg); + } + }); + }; + + render() { + const { fieldInformationConfirm, userConfirmed } = this.state; + const buttons = [ + , + + ]; + return ( + + {this.props.children} + + this.setState({ + fieldInformationConfirm: { ...fieldInformationConfirm, visible: false } + })}> +
+
+ {getLabel("111", "本次核算所属薪资账套发生变更,是否需要按最新的账套设置进行核算?按照最新的账套进行核算,将覆盖当前核算数据(不清空手动输入/导入的数据),且不可恢复,请谨慎操作。")} +
+
+ this.setState({ userConfirmed: v })}/> +
+
+
+
+ ); + } +} + +export default SalaryCalcLayout;