From f0a536e0ffc234a7c63d048b861f33f89ad717af Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 3 Dec 2025 14:35:21 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=92=B1=E6=99=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/standingBook.js | 12 +++++ .../salaryEditCalc/editCalcTable.js | 2 +- .../components/welfareRecordList.js | 28 +++++++++-- .../standingBook/standingBook.js | 50 +++++++++++++++---- 4 files changed, 79 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index faa75508..f94af920 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -229,3 +229,15 @@ export const addSocialAcctEmp = (params) => { export const deleteSocialAcctEmp = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params); }; +// 钱智二开-社保报表导出 +export const exportQZReport = params => { + return postExportFetch("/api/bs/hrmsalary/siaccount/exportQZReport", params); +}; +// 钱智二开-封存 +export const batFC = params => { + return postFetch("/api/bs/hrmsalary/siaccount/batFC", params); +}; +// 钱智二开-封存权限 +export const fcAuth = params => { + return postFetch("/api/bs/hrmsalary/siaccount/fcAuth", params); +}; \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js index 8e2a36ae..602d62e1 100644 --- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js @@ -265,7 +265,7 @@ class EditCalcTable extends Component { if (status) { const { columns, pageInfo: list, msg } = data; const { list: dataSource, pageNum: current, pageSize, total } = list; - this.props.onSetFormInfo(msg); + this.props.onSetFormInfo && this.props.onSetFormInfo(msg); this.setState({ pageInfo: { ...pageInfo, current, pageSize, total } }, () => { const { pageInfo, selectedRowKeys } = this.state; const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : ""; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js index 61469284..313717a1 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/welfareRecordList.js @@ -44,6 +44,10 @@ class WelfareRecordList extends Component { case "PAGEINFO": this.setState({ pageInfo: { ...pageInfo, ...params } }, () => this.getWelfareRecordList()); break; + case "CHECKBOX": + const { selectedRowKeys } = params; + this.props.onChangeSelectedRowKeys(selectedRowKeys); + break; case "CALC": case "VIEW": const payload = { @@ -105,6 +109,17 @@ class WelfareRecordList extends Component { case "log": this.props.onFilterLog(id, params.id); break; + case "FC": + API.batFC({ ids: [params.id], fc: !params.fc ? "FC" : "JF" }) + .then(({ status, data, errormsg }) => { + if (status) { + message.success(data || getLabel(111, "操作成功!")); + this.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); + break; default: break; } @@ -123,7 +138,7 @@ class WelfareRecordList extends Component { childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; getWelfareRecordList = () => { - const { queryForm } = this.props; + const { queryForm, selectedRowKeys, fcAuth } = this.props; const { pageInfo } = this.state; const payload = { ...pageInfo, ...queryForm, taxAgents: queryForm.taxAgents ? queryForm.taxAgents.split(",") : [] }; this.setState({ loading: true }); @@ -133,11 +148,18 @@ class WelfareRecordList extends Component { const { pageInfo: result } = data; let { columns, list: dataSource, pageNum: current, pageSize, total } = result; columns = _.map(columns, o => ({ ...o, width: o.dataIndex === "paymentOrganization" ? 300 : o.width })); + dataSource = _.map(dataSource, o => { + if (o.billStatus === "1" && fcAuth) { + return { ...o, qzOpts: [{ key: "FC", label: !o.fc ? getLabel(111, "封存") : getLabel(111, "解封") }] }; + } + return o; + }); this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns }, () => this.postMessageToChild({ - scrollHeight: 108, dataSource, columns, pageInfo: this.state.pageInfo, unitTableType: "welfareRecord" + scrollHeight: 108, dataSource, columns, pageInfo: this.state.pageInfo, unitTableType: "welfareRecord", + selectedRowKeys })); } }).catch(() => this.setState({ loading: false })); @@ -161,4 +183,4 @@ class WelfareRecordList extends Component { } } -export default WelfareRecordList; +export default WelfareRecordList; \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js index 394409e7..cde8e459 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/standingBook.js @@ -7,7 +7,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom"; import { Button, message } from "antd"; import * as API from "../../../apis/standingBook"; import { getCalculateProgress } from "../../../apis/calculate"; @@ -32,7 +32,7 @@ class StandingBook extends Component { startTime: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"), endTime: moment(new Date()).endOf("year").format("YYYY-MM"), taxAgents: "" - }, progressVisible: false, progress: 0, + }, progressVisible: false, progress: 0, selectedRowKeys: [], fcAuth: false, accountDialog: { visible: false, title: "", loading: false, options: [] }, logDialogVisible: false, filterConditions: "[]" }; @@ -40,6 +40,10 @@ class StandingBook extends Component { this.timer = null; } + componentDidMount() { + API.fcAuth({}).then(({ data, status }) => this.setState({ fcAuth: status && data })); + } + /* * Author: 黎永顺 * Description: 社保福利台账重构-核算 @@ -60,7 +64,10 @@ class StandingBook extends Component { progressVisible: true }, () => { this.timer = setInterval(() => { - getCalculateProgress(moment(billMonth).format("YYYY-MM"), payload.paymentOrganization).then(({ status, data }) => { + getCalculateProgress(moment(billMonth).format("YYYY-MM"), payload.paymentOrganization).then(({ + status, + data + }) => { if (status) { if (!data.status) { clearInterval(this.timer); @@ -112,18 +119,41 @@ class StandingBook extends Component { filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]" }); break; + case "QZBatchExp": + WeaLoadingGlobal.start(); + const promise = API.exportQZReport({ ids: this.state.selectedRowKeys }); + break; + case "QZBatchFc": + API.batFC({ ids: this.state.selectedRowKeys, fc: targetid }).then(({ status, data, errormsg }) => { + if (status) { + message.success(data || getLabel(111, "操作成功!")); + this.wfListRef.getWelfareRecordList(); + } else { + message.error(errormsg); + } + }); + break; default: break; } }; render() { - const { accountDialog, queryForm, logDialogVisible, filterConditions } = this.state; + const { accountDialog, queryForm, logDialogVisible, filterConditions, selectedRowKeys, fcAuth } = this.state; const { taxAgentStore: { PageAndOptAuth } } = this.props; const showOperateBtn = PageAndOptAuth.opts.includes("admin"); - const rightBtns = []; + const rightBtns = [ + , + , + , + + ]; + !fcAuth && rightBtns.splice(1, 2); return (} iconBgcolor="#F14A2D" buttons={showOperateBtn ? rightBtns : []} className="salary-welfare-record" showDropIcon onDropMenuClick={this.onDropMenuClick} @@ -143,7 +173,9 @@ class StandingBook extends Component { onPutAccountOptions={options => this.setState({ accountDialog: { ...accountDialog, options } })} /> this.wfListRef = dom} queryForm={queryForm} - onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/> + onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)} + selectedRowKeys={selectedRowKeys} fcAuth={fcAuth} + onChangeSelectedRowKeys={v => this.setState({ selectedRowKeys: v })}/> this.setState({ @@ -166,4 +198,4 @@ class StandingBook extends Component { } } -export default StandingBook; +export default StandingBook; \ No newline at end of file