From c468ff35ffa211396b58b9d28dfb004f993fa71d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Wed, 23 Nov 2022 15:42:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89?=
=?UTF-8?q?=E5=8A=A1=E4=BA=BA=E6=B7=BB=E5=8A=A0=E5=90=8C=E6=AD=A5=E4=BA=BA?=
=?UTF-8?q?=E5=91=98=E8=8C=83=E5=9B=B4=E7=9A=84=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/taxAgent.js | 11 +++++++++
pc4mobx/hrmSalary/pages/taxAgent/index.js | 27 +++++++++++++++++++----
pc4mobx/hrmSalary/stores/taxAgent.js | 6 ++++-
3 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js
index e5177c4d..d68e965d 100644
--- a/pc4mobx/hrmSalary/apis/taxAgent.js
+++ b/pc4mobx/hrmSalary/apis/taxAgent.js
@@ -12,6 +12,17 @@ export const getTaxAgentList = (params) => {
body: JSON.stringify(params),
}).then((res) => res.json());
};
+//同步人员范围
+export const taxAgentRangeSync = (params) => {
+ return fetch("/api/bs/hrmsalary/taxAgent/range/sync", {
+ method: "POST",
+ mode: "cors",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify(params),
+ }).then((res) => res.json());
+};
// 系统管理员权限
export const getPermission = (params) => {
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js
index d599b779..26356da9 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/index.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js
@@ -1,6 +1,6 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { Col, message, Modal, Row, Switch } from "antd";
+import { Button, Col, message, Modal, Row, Switch } from "antd";
import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
import EditModal from "./editModal";
@@ -28,7 +28,8 @@ export default class TaxAgent extends React.Component {
devolutionStatus: 0,
conditions: editConditions,
decentralizationConditions: decentralizationConditions,
- permission: {}
+ permission: {},
+ syncLoading: false
};
}
@@ -120,7 +121,7 @@ export default class TaxAgent extends React.Component {
this.setState(
{
conditions: [{ defaultshow: true, items: conditionMap }],
- decentralizationConditions: [{ defaultshow: true, items: conditionMap }],
+ decentralizationConditions: [{ defaultshow: true, items: conditionMap }]
},
() => {
devolutionStatus === 1 ? getCondition(this.state.conditions) : getFormDecentralizationCondition(this.state.decentralizationConditions);
@@ -268,6 +269,19 @@ export default class TaxAgent extends React.Component {
}
});
};
+ taxAgentRangeSync = () => {
+ const { taxAgentStore } = this.props;
+ const { taxAgentRangeSync, getTaxAgentList } = taxAgentStore;
+ this.setState({ syncLoading: true });
+ taxAgentRangeSync({}).then(({ status, data }) => {
+ this.setState({ syncLoading: false });
+ if (status) {
+ message.success(data || "操作成功");
+ getTaxAgentList();
+ }
+ });
+ };
+
render() {
const { taxAgentStore } = this.props;
@@ -277,7 +291,8 @@ export default class TaxAgent extends React.Component {
devolutionStatus,
conditions,
decentralizationConditions,
- permission
+ permission,
+ syncLoading
} = this.state;
const {
loading,
@@ -293,6 +308,9 @@ export default class TaxAgent extends React.Component {
return renderNoright();
}
+ const btns = [
+
+ ];
const renderTipsLabel = () => {
const tipList = [
"1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;",
@@ -376,6 +394,7 @@ export default class TaxAgent extends React.Component {
title="个税扣缴义务人" // 文字
icon={} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
+ buttons={btns}
showDropIcon={true}>
(this.showSearchAd = bool);
+ @action("同步人员范围")
+ taxAgentRangeSync = params => {
+ return API.taxAgentRangeSync(params);
+ };
+
// 高级搜索 - 搜索
@action
doSearch = name => {