From ce19b4b88864d8e4338713a33e41eb76a0c6ed50 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 12 Jun 2025 16:56:24 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.19.1.2501.01-=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/attendanceDataViewSlide.js | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js index e57660a4..de1eb0ad 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js @@ -8,7 +8,7 @@ import React, { Component } from "react"; import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom"; import { batchDeleteData, viewAttendQuote } from "../../../../apis/attendance"; import AttendanceDataEditSlide from "./attendanceDataEditSlide"; -import { Button, message, Spin } from "antd"; +import { Button, message, Modal, Spin } from "antd"; import "./index.less"; import { calcPageNo } from "../../../../util"; @@ -18,7 +18,7 @@ class AttendanceDataViewSlide extends Component { constructor(props) { super(props); this.state = { - loading: { query: false }, keyword: "", dataSource: [], selectedRowKeys: [], + loading: { query: false, del: false }, keyword: "", dataSource: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, attendanceSlide: { visible: false, record: {} } }; } @@ -104,16 +104,26 @@ class AttendanceDataViewSlide extends Component { this.handleDebounce(); }; batchDeleteData = () => { - const { selectedRowKeys, pageInfo } = this.state; - batchDeleteData({ attendQuoteDataIds: selectedRowKeys }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(111, "操作成功!")); - this.setState({ - selectedRowKeys: [], - pageInfo: { ...pageInfo, current: calcPageNo(pageInfo.total, pageInfo.current, 10, selectedRowKeys.length) } - }, () => this.viewAttendQuote()); - } else { - message.error(errormsg); + Modal.confirm({ + title: getLabel(111, "信息确认"), + content: getLabel(111, "确认要删除吗?"), + onOk: () => { + const { selectedRowKeys, pageInfo, loading } = this.state; + this.setState({ loading: { ...loading, del: true } }); + batchDeleteData({ attendQuoteDataIds: selectedRowKeys }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "操作成功!")); + this.setState({ + selectedRowKeys: [], loading: { ...loading, del: false }, + pageInfo: { + ...pageInfo, + current: calcPageNo(pageInfo.total, pageInfo.current, 10, selectedRowKeys.length) + } + }, () => this.viewAttendQuote()); + } else { + message.error(errormsg); + } + }); } }); };