From d68ec3743b7e6f759e4dc0c67929d50da0ba400f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 9 Jul 2024 10:52:09 +0800
Subject: [PATCH] =?UTF-8?q?custom/=E4=B8=8A=E6=B5=B7=E6=B8=AF=E6=B9=BE?=
=?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/taxAgent.js | 4 ++
.../components/PersonalScopeModal/index.js | 41 +++++++++++++++----
pc4mobx/hrmSalary/pages/ledger/index.less | 9 ++++
.../pages/taxAgent/addTaxAgentModal.js | 25 ++++++++++-
4 files changed, 70 insertions(+), 9 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js
index f3c527b1..65e3ef95 100644
--- a/pc4mobx/hrmSalary/apis/taxAgent.js
+++ b/pc4mobx/hrmSalary/apis/taxAgent.js
@@ -98,3 +98,7 @@ export const getTaxAgentSelectListAsAdmin = (params) => {
export const hasIconInTax = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
};
+//港湾二开-获取用工关系
+export const getYggxList = (params) => {
+ return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/range/yggxList", "GET", params);
+};
diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
index d9bc8de7..2de7968a 100644
--- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
+++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
@@ -5,14 +5,15 @@
* Date: 2022/11/30
*/
import React, { Component } from "react";
-import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom";
+import { WeaBrowser, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, message, Modal } from "antd";
-import { getTaxAgentRangeForm } from "../../apis/taxAgent";
+import { getTaxAgentRangeForm, getYggxList } from "../../apis/taxAgent";
import { commonEnumList } from "../../apis/ruleconfig";
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
+
class PersonalScopeModal extends Component {
constructor(props) {
super(props);
@@ -24,7 +25,8 @@ class PersonalScopeModal extends Component {
targetTypeIds: "",
targetTypeIdsNames: "",
status: "",
- statusAll: ""
+ statusAll: "",
+ yggxOptions: []
};
}
@@ -33,7 +35,8 @@ class PersonalScopeModal extends Component {
if (isTaxgent) {
this.getTaxAgentRangeForm();
} else {
- this.commonEnumList();
+ this.commonEnumList().then(r => {
+ });
// const employeeStatus = [
// { key: "TRIAL", showname: "试用" },
// { key: "FORMAL", showname: "正式" },
@@ -69,7 +72,8 @@ class PersonalScopeModal extends Component {
}
}
- commonEnumList = () => {
+ commonEnumList = async () => {
+ const { data: reslut } = await getYggxList();
commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => {
if (status) {
const targetTypeList = [
@@ -92,11 +96,20 @@ class PersonalScopeModal extends Component {
key: "POSITION",
showname: getLabel(6086, "岗位"),
selected: false
+ },
+ {
+ key: "YGGX",
+ showname: getLabel(547801, "用工关系"),
+ selected: false
}
];
this.setState({
targetTypeList,
- employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ key: it.enum, showname: it.defaultLabel }))
+ employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({
+ key: it.enum,
+ showname: it.defaultLabel
+ })),
+ yggxOptions: _.map(reslut, it => ({ key: it.id, showname: it.name }))
});
}
});
@@ -183,7 +196,9 @@ class PersonalScopeModal extends Component {
render() {
const { onCancel, title, visible } = this.props;
- const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state;
+ const {
+ employeeStatus, targetTypeList, targetType, status, statusAll, loading, yggxOptions, targetTypeIds
+ } = this.state;
const buttons = [
,
@@ -214,7 +229,17 @@ class PersonalScopeModal extends Component {
options={targetTypeList}
onChange={(targetType) => this.setState({ targetType })}
/>
- {this.renderBrowser()}
+ {
+ targetType !== "YGGX" ? this.renderBrowser() :
+ this.setState({
+ targetTypeIds,
+ targetTypeIdsNames
+ })}
+ />
+ }
{
diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less
index 27948111..9bc083be 100644
--- a/pc4mobx/hrmSalary/pages/ledger/index.less
+++ b/pc4mobx/hrmSalary/pages/ledger/index.less
@@ -316,6 +316,15 @@
//关联人员弹框
.associatesWrapper {
+ .yggx-select {
+ .wea-select-input {
+ & > span {
+ position: absolute;
+ top: 14px;
+ }
+ }
+ }
+
.wea-select, .ant-select-selection, .ant-select {
width: 100%;
}
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
index 1e1ae489..3835eeb9 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
@@ -1,6 +1,7 @@
import React from "react";
import { Button, Col, Row } from "antd";
import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect } from "ecCom";
+import { getYggxList } from "../../apis/taxAgent";
import "../ledger/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -11,10 +12,19 @@ export default class AddTaxAgentModal extends React.Component {
selectedKey: "EMPLOYEE",
checkboxValue: "",
checkAll: "0",
- ids: ""
+ ids: "",
+ yggxOptions: []
};
}
+ componentDidMount() {
+ getYggxList().then(({ status, data }) => {
+ if (status) {
+ this.setState({ yggxOptions: _.map(data, it => ({ key: it.id, showname: it.name })) });
+ }
+ });
+ }
+
onCheckboxChange = (checkboxValue) => {
const { employeeStatus } = this.props;
const checked = _.map(employeeStatus, it => it.id);
@@ -72,6 +82,7 @@ export default class AddTaxAgentModal extends React.Component {
render() {
const { employeeStatus, targetTypeList, visible, onCancel, loading } = this.props;
+ const { yggxOptions } = this.state;
return (
)}
+ {this.state.selectedKey === "YGGX" && (
+
+ this.setState({ ids })}
+ />
+
+ )}