From 2f649ecae618a5eea34f8385d1192f69188e9b82 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 10 Jun 2025 10:00:37 +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/calculate.js | 4 ++++
pc4mobx/hrmSalary/pages/calculate/calculate.js | 9 +++++++--
.../calculate/components/calculateDialog/index.js | 11 ++++++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js
index 6c7fc16a..20011192 100644
--- a/pc4mobx/hrmSalary/apis/calculate.js
+++ b/pc4mobx/hrmSalary/apis/calculate.js
@@ -14,6 +14,10 @@ export const saveBasic = params => {
export const batSaveBasic = params => {
return postFetch("/api/bs/hrmsalary/salaryacct/basic/batSave", params);
};
+// 薪资记录--批量新建并核算
+export const batSaveAndAcct = params => {
+ return postFetch("/api/bs/hrmsalary/salaryacct/batSaveAndAcct", params);
+};
// 薪资记录--薪资核算详情
export const salaryacctGetForm = params => {
diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js
index 55f1139d..c2117049 100644
--- a/pc4mobx/hrmSalary/pages/calculate/calculate.js
+++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js
@@ -80,10 +80,15 @@ class Calculate extends Component {
let calculateOpts = [
,
+ ,
@@ -98,7 +103,7 @@ class Calculate extends Component {
queryParams: { ...queryParams, ...v }
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
];
- return !showOperateBtn ? calculateOpts.slice(2) : calculateOpts;
+ return !showOperateBtn ? calculateOpts.slice(3) : calculateOpts;
};
handleCalcOpts = ({ key }, record) => {
const { isRefresh, progressModule } = this.state, { id } = record;
diff --git a/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js b/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js
index 2c503e45..373c4a9e 100644
--- a/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/components/calculateDialog/index.js
@@ -9,12 +9,17 @@ import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../../util";
-import { batSaveBasic, salaryacctGetForm } from "../../../../apis/calculate";
+import { batSaveAndAcct, batSaveBasic, salaryacctGetForm } from "../../../../apis/calculate";
import { calculateConditions } from "./condition";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
+const API = {
+ "batSaveAndAcct": batSaveAndAcct,
+ "acct": batSaveBasic
+};
+
@inject("calculateStore")
@observer
class Index extends Component {
@@ -53,12 +58,12 @@ class Index extends Component {
});
};
save = () => {
- const { calculateStore: { calculateForm } } = this.props;
+ const { calculateStore: { calculateForm }, type = "acct" } = this.props;
calculateForm.validateForm().then(f => {
if (f.isValid) {
const { salarySobId, salaryMonthStr, ...payload } = calculateForm.getFormParams();
this.setState({ loading: true });
- batSaveBasic({ ...payload, salaryMonth: `${salaryMonthStr}-01`, salarySobIds: salarySobId.split(",") })
+ API[type]({ ...payload, salaryMonth: `${salaryMonthStr}-01`, salarySobIds: salarySobId.split(",") })
.then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {