diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index 8243f721..54c6959f 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -300,3 +300,11 @@ export const deleteDeductionAmount = (params) => { export const editDeductionAmount = (params) => { return postFetch("/api/bs/hrmsalary/deductionAmount/edit", params); }; +//扣除名单确认-确认人员 +export const confirmDeductionAmount = (params) => { + return postFetch("/api/bs/hrmsalary/deductionAmount/confirm", params); +}; +//扣除名单确认-反馈人员 +export const feedbackDeductionAmount = (params) => { + return postFetch("/api/bs/hrmsalary/deductionAmount/feedback", params); +}; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/deductionListConfirmDialog.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/deductionListConfirmDialog.js index 70f89a0f..b13202ff 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/deductionListConfirmDialog.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/components/deductionListConfirmDialog.js @@ -10,7 +10,7 @@ import React, { Component } from "react"; import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom"; import DeductionListConfirmEmployeeDialog from "./deductionListConfirmEmployeeDialog"; import DeductionAmountEditDialog from "./deductionAmountEditDialog"; -import { message, Modal } from "antd"; +import { Button, Col, message, Modal, Row } from "antd"; import * as API from "../../../apis/declare"; const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools; @@ -20,7 +20,7 @@ class DeductionListConfirmDialog extends Component { super(props); this.state = { pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, columns: [], dataSource: [], visible: false, - selectedRowKeys: [], editDialog: { visible: false, record: {} } + selectedRowKeys: [], editDialog: { visible: false, record: {} }, loadingBtn: { confirm: false, feedback: false } }; } @@ -72,9 +72,37 @@ class DeductionListConfirmDialog extends Component { } }); }; + confirmDeductionAmount = () => { + const { id: taxAgentId } = getUrlParams(), { year } = this.props; + const payload = { taxAgentId, year }; + this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } }); + API.confirmDeductionAmount(payload).then(({ status, errormsg }) => { + this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } }); + if (status) { + message.success(getLabel(111, "操作成功")); + this.getDeductionAmountList(); + } else { + message.error(errormsg); + } + }); + }; + feedbackDeductionAmount = () => { + const { id: taxAgentId } = getUrlParams(), { year } = this.props; + const payload = { taxAgentId, year }; + this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } }); + API.feedbackDeductionAmount(payload).then(({ status, errormsg }) => { + this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } }); + if (status) { + message.success(getLabel(111, "操作成功")); + this.getDeductionAmountList(); + } else { + message.error(errormsg); + } + }); + }; render() { - const { loading, columns, dataSource, pageInfo, visible, selectedRowKeys, editDialog } = this.state; + const { loading, columns, dataSource, pageInfo, visible, selectedRowKeys, editDialog, loadingBtn } = this.state; const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -97,7 +125,18 @@ class DeductionListConfirmDialog extends Component { }; const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400; return ( - + + {getLabel(111, "扣除名单确认")} + + + + + + )} style={{ width: 1150, height: 490, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less index 655ec57d..174530b2 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less @@ -209,20 +209,30 @@ } //扣除名单确认 -.confirmationDialogContent { - width: 100%; - height: 100%; - background: #f6f6f6; - padding: 8px 16px; +.confirmationDialog { + .title-right { + text-align: right; - .tableBtns { - display: grid; - grid-template-columns: auto auto; - justify-content: end; - gap: 10px; + button { + margin-left: 10px; + } } - .wea-new-table { - background: #FFF; + .confirmationDialogContent { + width: 100%; + height: 100%; + background: #f6f6f6; + padding: 8px 16px; + + .tableBtns { + display: grid; + grid-template-columns: auto auto; + justify-content: end; + gap: 10px; + } + + .wea-new-table { + background: #FFF; + } } }