From 1542d8c98221c38f06486720c73ee216c6fd059a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Fri, 14 Jul 2023 14:09:27 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E7=B3=BB=E7=BB=9F=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/ruleconfig.js | 8 +++
.../components/ledgerAssociatedPersonnel.js | 23 ++++++-
pc4mobx/hrmSalary/pages/payrollFiles/index.js | 22 +++++-
pc4mobx/hrmSalary/pages/ruleConfig/index.js | 68 +++++++++++++++----
.../pages/taxAgent/slideTaxagentUser.js | 48 ++++++++-----
5 files changed, 131 insertions(+), 38 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js
index 2e3c0c4f..69cfa1fa 100644
--- a/pc4mobx/hrmSalary/apis/ruleconfig.js
+++ b/pc4mobx/hrmSalary/apis/ruleconfig.js
@@ -6,6 +6,10 @@ export const commonEnumList = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
};
+export const sysinfo = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params);
+};
+
export const sysOrderRule = params => {
return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params);
};
@@ -47,6 +51,10 @@ export const operateTaxDeclarationFunction = (params) => {
export const saveArchiveDelete = (params) => {
return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params);
};
+//保存系统规则开关
+export const saveSysOperate = (params) => {
+ return postFetch("/api/bs/hrmsalary/sys/operate", params);
+};
//保存个税申报撤回规则
export const saveWithDrawTaxDeclaration = (params) => {
return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params);
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
index 723b56b3..76913307 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
@@ -24,6 +24,7 @@ import {
import ImportModal from "../../../components/importModal";
import { importEmployColumns } from "../../taxAgent/columns";
import ExternalPersonModal from "../../../components/externalPersonModal";
+import { sysinfo } from "../../../apis/ruleconfig";
const APIFox = {
listInclude: getLedgerPersonRangeInclude,
@@ -55,10 +56,26 @@ class LedgerAssociatedPersonnel extends Component {
visible: false,
title: "关联人员",
includeType: ""
- }
+ },
+ extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
};
}
+ componentDidMount() {
+ this.getSysinfo();
+ }
+
+ /*
+ * Author: 黎永顺
+ * Description: 非系统人员开关查询
+ * Params:
+ * Date: 2023/7/14
+ */
+ getSysinfo = () => {
+ sysinfo().then(({ status, data }) => {
+ if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
+ });
+ };
/*
* Author: 黎永顺
* Description:外部人员保存
@@ -202,7 +219,7 @@ class LedgerAssociatedPersonnel extends Component {
importParams,
previewDataSource,
externalPersonModalVisible,
- loading
+ loading, extEmpsWitch
} = this.state;
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
const topTab = [
@@ -257,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component {
return (
{
+ sysinfo().then(({ status, data }) => {
+ if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
+ });
+ };
+
handleReceive = ({ data }) => {
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
@@ -703,7 +718,8 @@ class Index extends Component {
showSearchAd,
slideParams,
changeSalaryVisible,
- paysetParams
+ paysetParams,
+ extEmpsWitch
} = this.state;
const { payrollFilesStore: { tableStore } } = this.props;
const renderSearch = () => {
@@ -762,7 +778,7 @@ class Index extends Component {
dropMenuDatas={rightMenu}
>
({ key: it.value, showname: it.defaultLabel }));
const orderOptions = _.map(orderRuleEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
const ascOptions = _.map(ascOrDescEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
const employeeOptions = _.map(matchEmployeeModeEnum.data, it => ({ key: it.value, showname: it.defaultLabel }));
- const { data: { ascOrDesc, orderRule } } = orderRules;
- const { data: rule } = codeRule;
const {
data: {
- showEncryptOperationButton,
- isOpenEncrypt: enctry,
- isOpenTaxDeclaration: operateTaxDeclaration,
- salaryAcctEmployeeRule: matchRule,
- salaryArchiveDelete: confValue, withDrawTaxDeclaration
+ ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
+ taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue,
+ salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
+ OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0"
}
- } = appSettings;
+ } = sysInfo;
+ // const { data: { ascOrDesc, orderRule } } = orderRules;
+ // const { data: rule } = codeRule;
+ // const {
+ // data: {
+ // showEncryptOperationButton,
+ // isOpenEncrypt: enctry
+ // isOpenTaxDeclaration: operateTaxDeclaration,
+ // salaryAcctEmployeeRule: matchRule,
+ // salaryArchiveDelete: confValue,
+ // withDrawTaxDeclaration
+ // }
+ // } = appSettings;
this.setState({
matchRuleOptions, orderOptions, ascOptions, employeeOptions,
showEncryptOperationButton,
saveParams: {
...saveParams,
- ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration
+ ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, confValue, withDrawTaxDeclaration,
+ extEmpsWitch
}
});
}
+ sysinfo = () => {
+ return API.sysinfo();
+ };
+
sysOrderRule = () => {
return API.sysOrderRule();
};
@@ -210,6 +227,16 @@ export default class Index extends Component {
}
});
};
+ saveSysOperate = (payload) => {
+ API.saveSysOperate({ ...payload, confValue: this.state.saveParams.extEmpsWitch })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(22619, "保存成功!"));
+ } else {
+ message.error(errormsg || getLabel(22620, "保存失败!"));
+ }
+ });
+ };
withDrawTaxDeclaration = () => {
API.saveWithDrawTaxDeclaration({ confValue: _.pick(this.state.saveParams, ["withDrawTaxDeclaration"]).withDrawTaxDeclaration })
.then(({ status, errormsg }) => {
@@ -256,6 +283,12 @@ export default class Index extends Component {
case "withDrawTaxDeclaration":
this.withDrawTaxDeclaration();
break;
+ case "extEmpsWitch":
+ this.saveSysOperate({
+ title: getLabel(111, "开启非系统人员"),
+ module: "basic", confKey: key
+ });
+ break;
default:
break;
}
@@ -289,7 +322,8 @@ export default class Index extends Component {
operateTaxDeclaration,
matchRule,
confValue,
- withDrawTaxDeclaration
+ withDrawTaxDeclaration,
+ extEmpsWitch
} = saveParams;
return (
@@ -330,7 +364,7 @@ export default class Index extends Component {
}
- this.handleChange("operateTaxDeclaration", val)}/>
@@ -351,6 +385,12 @@ export default class Index extends Component {
/>
+
+
+ this.handleChange("extEmpsWitch", val)}/>
+
+
{
this.state.progressVisible &&
{
- onChangeTab && onChangeTab(includeType);
- }
- );
+ componentDidMount() {
+ this.getSysinfo();
}
+ /*
+ * Author: 黎永顺
+ * Description: 非系统人员开关查询
+ * Params:
+ * Date: 2023/7/14
+ */
+ getSysinfo = () => {
+ sysinfo().then(({ status, data }) => {
+ if (status) this.setState({ extEmpsWitch: data.extEmpsWitch });
+ });
+ };
+
onSelectChange = selectedRowKeys => {
this.setState({ selectedRowKeys });
};
@@ -125,7 +130,7 @@ export default class SlideTaxagentUser extends React.Component {
externalPersonModalVisible,
importParams,
previewDataSource,
- showSearchAd
+ showSearchAd, extEmpsWitch
} = this.state;
const {
submitLoading,
@@ -193,11 +198,18 @@ export default class SlideTaxagentUser extends React.Component {
return (