From 004deaeea3d431da7adaa61223dcb4fe6eced865 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 4 Jun 2025 13:47:12 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.19.1.2501.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/standingBook.js | 8 ++++ .../hrmSalary/pages/calculate/calculate.js | 15 +++--- .../hrmSalary/pages/payrollRelease/index.js | 14 +++--- .../components/welfareRecordList.js | 14 +++++- .../standingBook/standingBook.js | 46 +++++++++++++------ pc4mobx/hrmSalary/style/index.less | 15 ++++++ 6 files changed, 85 insertions(+), 27 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 147e6e43..ab487d60 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -41,6 +41,10 @@ export const batSave = (params) => { export const siaccountFile = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/file", params); }; +//社会福利台账-批量归档 +export const batSiaccountFile = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/batFile", params); +}; //社会福利台账-核算异常列表 export const inspectList = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/inspectList", params); @@ -61,6 +65,10 @@ export const siaccountSupplementarySave = (params) => { export const siaccountDelete = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/delete", params); }; +//社会福利台账-批量删除月份表单 +export const batSiaccountDelete = (params) => { + return postFetch("/api/bs/hrmsalary/siaccount/batDelete", params); +}; //社会福利台账-正常缴纳添加缴纳人员表单 export const siaccountCommonForm = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/siaccount/commonForm", "get", params); diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index f723b931..55f1139d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -84,11 +84,14 @@ class Calculate extends Component { title: getLabel(538780, "核算") } })}>{getLabel(538780, "核算")}, - - - , + + + + + + , this.setState({ showAdvance: !showAdvance })} onChange={v => this.setState({ isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh, @@ -218,7 +221,7 @@ class Calculate extends Component { onDropMenuClick = (key, targetid = "") => { switch (key) { case "batArchiving": - batFile({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => { + batFile({ salaryAcctRecordIds: this.state.selectedRowKeys }).then(({ status, errormsg }) => { if (status) { message.success(getLabel(111, "操作成功!")); this.setState({ isRefresh: !this.state.isRefresh }); diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/index.js index 9587b8be..8e07cfc0 100644 --- a/pc4mobx/hrmSalary/pages/payrollRelease/index.js +++ b/pc4mobx/hrmSalary/pages/payrollRelease/index.js @@ -52,12 +52,14 @@ class Index extends Component { switch (selectedKey) { case "grant": reqBtns = [ - - - , + + + + + + , this.setState({ isRefresh: !isRefresh, diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js index 7c8221a0..08c19c12 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { message, Modal, Spin } from "antd"; import { WeaLocaleProvider } from "ecCom"; -import { getIframeParentHeight } from "../../../../util"; +import { calcPageNo, getIframeParentHeight } from "../../../../util"; import * as API from "../../../../apis/standingBook"; import { convertToUrlString } from "../../../../util/url"; @@ -33,6 +33,16 @@ class WelfareRecordList extends Component { window.removeEventListener("message", this.handleReceive, false); } + batDelQueryList = (selectDelDataLen = 1) => { + this.setState({ + pageInfo: { + ...this.state.pageInfo, + current: calcPageNo(this.state.pageInfo.total, this.state.pageInfo.current, 10, selectDelDataLen) + } + }, () => { + this.getWelfareRecordList(); + }); + }; handleReceive = ({ data }) => { const { pageInfo } = this.state; const { type, payload: { id, params } = {} } = data; @@ -68,7 +78,7 @@ class WelfareRecordList extends Component { API.siaccountDelete(module).then(({ status, errormsg }) => { if (status) { message.success(getLabel(502230, "删除成功")); - this.getWelfareRecordList(); + this.batDelQueryList(); } else { message.error(errormsg); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index 4eb49fd2..36b019f7 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -140,14 +140,31 @@ class StandingBook extends Component { Modal.confirm({ title: getLabel(111, "确认信息"), content: getLabel(388758, "确认要删除吗?"), onOk: () => { - // API.siaccountDelete(module).then(({ status, errormsg }) => { - // if (status) { - // message.success(getLabel(502230, "删除成功")); - // this.wfListRef.wrappedInstance.getWelfareRecordList(); - // } else { - // message.error(errormsg); - // } - // }); + API.batSiaccountDelete({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(502230, "删除成功")); + this.wfListRef.wrappedInstance.batDelQueryList(this.state.selectedRowKeys.length); + this.setState({ selectedRowKeys: [] }); + } else { + message.error(errormsg); + } + }); + } + }); + break; + case "batArchiving": + Modal.confirm({ + title: getLabel(111, "确认信息"), + content: getLabel(111, "归档后,此条台账数据无法删除且不可以再进行此月份的核算,是否确认归档?"), + onOk: () => { + API.batSiaccountFile({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功!")); + this.wfListRef.wrappedInstance.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); } }); break; @@ -175,11 +192,14 @@ class StandingBook extends Component { , - - - + + + + + + ]; return (} iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []} className="salary-welfare-record" diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index eedbf38d..00b02184 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -139,3 +139,18 @@ } } +//自定义下拉Dropdown按钮样式 +.cust-dropdown-btn { + border-bottom-right-radius: 0 !important; + border-top-right-radius: 0 !important; + padding-right: 8px !important; +} + +.cust-dropdown-btnIcon { + border-bottom-left-radius: 0 !important; + border-top-left-radius: 0 !important; + padding-left: 8px !important; + padding-right: 7px !important; +} + +