From ca5b60f6aa0cfec2791d51e9e07fe79212effd82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 12 Oct 2023 13:57:14 +0800
Subject: [PATCH 01/29] =?UTF-8?q?feature/2.9.42310.01-=E4=B8=AA=E7=A8=8E?=
=?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 3 +-
pc4mobx/hrmSalary/pages/declare/columns.js | 37 -----
.../components/declareDialog/condition.js | 43 ++++++
.../declare/components/declareDialog/index.js | 92 +++++++++++
.../declare/components/declareQuery/index.js | 34 +++++
.../components/declareTablelist/index.js | 144 ++++++++++++++++++
pc4mobx/hrmSalary/pages/declare/declare.js | 81 ++++++++++
pc4mobx/hrmSalary/pages/declare/index.less | 64 ++++++++
pc4mobx/hrmSalary/stores/declare.js | 11 +-
9 files changed, 470 insertions(+), 39 deletions(-)
delete mode 100644 pc4mobx/hrmSalary/pages/declare/columns.js
create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js
create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
create mode 100644 pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
create mode 100644 pc4mobx/hrmSalary/pages/declare/declare.js
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index ca8f7464..80199485 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -20,7 +20,8 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页
import Payroll from "./pages/payroll";
import PayrollGrant from "./pages/payroll/payrollGrant";
import PayrollDetail from "./pages/payroll/payrollDetail";
-import Declare from "./pages/declare";
+// import Declare from "./pages/declare";
+import Declare from "./pages/declare/declare"; //重构的个税申报表
import TaxRate from "./pages/taxRate";
import TaxAgent from "./pages/taxAgent";
import CalculateDetail from "./pages/calculateDetail";
diff --git a/pc4mobx/hrmSalary/pages/declare/columns.js b/pc4mobx/hrmSalary/pages/declare/columns.js
deleted file mode 100644
index cb5e65d3..00000000
--- a/pc4mobx/hrmSalary/pages/declare/columns.js
+++ /dev/null
@@ -1,37 +0,0 @@
-export const columns = [
- {
- title: "姓名",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "个税扣缴义务人",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "部门",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "手机号",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "员工状态",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "基本工资",
- dataIndex: 'title',
- key: 'title',
- },
- {
- title: "操作",
- dataIndex: 'cz',
- key: 'cz',
- }
-]
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js
new file mode 100644
index 00000000..d880c3f1
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/condition.js
@@ -0,0 +1,43 @@
+export const declareConditions = [
+ {
+ items: [
+ {
+ colSpan: 1,
+ conditionType: "MONTHPICKER",
+ domkey: ["salaryMonthStr"],
+ fieldcol: 14,
+ label: "薪资所属月",
+ lanId: 542604,
+ labelcol: 6,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ colSpan: 1,
+ conditionType: "SELECT",
+ domkey: ["taxAgentId"],
+ fieldcol: 14,
+ label: "个税扣缴义务人",
+ lanId: 537996,
+ labelcol: 6,
+ options: [],
+ rules: "required|string",
+ viewAttr: 3,
+ },
+ {
+ colSpan: 1,
+ conditionType: "INPUT",
+ domkey: ["description"],
+ fieldcol: 14,
+ label: "备注",
+ lanId: 536726,
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ defaultshow: true,
+ title: ""
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
new file mode 100644
index 00000000..a2ce2936
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
@@ -0,0 +1,92 @@
+/*
+ * Author: 黎永顺
+ * name: 个税申报重构- 申报
+ * Description:
+ * Date: 2023/10/12
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button, message } from "antd";
+import { getSearchs } from "../../../../util";
+import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
+import { saveDeclare } from "../../../../apis/declare";
+import { declareConditions } from "./condition";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("declareStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ conditions: [], loading: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxAgentSelectListAsAdmin(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm();
+ }
+
+ getTaxAgentSelectListAsAdmin = (props) => {
+ const { declareStore: { declareForm } } = props;
+ getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ conditions: _.map(declareConditions, item => ({
+ ...item,
+ items: _.map(item.items, o => {
+ if (getKey(o) === "taxAgentId") {
+ return {
+ ...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
+ // helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
+ };
+ }
+ return { ...o };
+ })
+ }))
+ }, () => declareForm.initFormFields(this.state.conditions));
+ }
+ });
+ };
+ save = () => {
+ const { declareStore: { declareForm } } = this.props;
+ declareForm.validateForm().then(f => {
+ if (f.isValid) {
+ const payload = declareForm.getFormParams();
+ this.setState({ loading: true });
+ saveDeclare({ ...payload }).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功"));
+ this.props.onCancel("refresh");
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ loading: false }));
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { conditions, loading } = this.state;
+ const { declareStore: { declareForm } } = this.props;
+ return (
+ {getLabel(543618, "生成申报表")}
+ ]}
+ >
+ {getSearchs(declareForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
new file mode 100644
index 00000000..f5627a0c
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareQuery/index.js
@@ -0,0 +1,34 @@
+/*
+ * Author: 黎永顺
+ * name: 个税申报表重构-查询
+ * Description:
+ * Date: 2023/10/12
+ */
+import React, { Component } from "react";
+import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
+import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ render() {
+ const { queryParams } = this.props;
+ const { dateRange, name } = queryParams;
+ return (
+
+
+ {getLabel(543549, "薪资所属月:")}
+ this.props.onChange({ dateRange: v })}/>
+
+
this.props.onChange({ taxAgentName: v })}
+ onSearch={this.props.onSearch}
+ />
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
new file mode 100644
index 00000000..5ee8b1b4
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
@@ -0,0 +1,144 @@
+/*
+ * Author: 黎永顺
+ * name: 个税申报重构-列表
+ * Description:
+ * Date: 2023/10/12
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { message, Modal } from "antd";
+import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
+import { sysConfCodeRule } from "../../../../apis/ruleconfig";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, columns: [], dataSource: [], showWithDrawBtn: false,
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
+ };
+ }
+
+ componentDidMount() {
+ this.getDeclareList(this.props);
+ this.sysConfCodeRule();
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.isRefresh !== this.props.isRefresh) this.getDeclareList(nextProps);
+ }
+
+ sysConfCodeRule = () => {
+ sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => {
+ if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
+ });
+ };
+ getDeclareList = (props) => {
+ const { pageInfo } = this.state;
+ const { queryParams } = props;
+ const { dateRange, ...extra } = queryParams;
+ const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
+ const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
+ const payload = { ...pageInfo, ...params };
+ this.setState({ loading: true });
+ getDeclareList(payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, list: dataSource, pageNum, pageSize, total } = data;
+ this.setState({
+ dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
+ columns: _.map(columns, o => {
+ const { dataIndex } = o;
+ let width = "";
+ switch (dataIndex) {
+ case "taxAgentName":
+ case "operateTime":
+ width = "15%";
+ break;
+ case "description":
+ width = "20%";
+ break;
+ default:
+ width = "10%";
+ break;
+ }
+ return { ...o, width };
+ })
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ taxdeclarationDelete = (taxDeclarationId) => {
+ withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(505793, "撤回成功"));
+ this.getDeclareList(this.props);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
+
+ render() {
+ const { loading, dataSource, columns, pageInfo, showWithDrawBtn } = this.state;
+ const pagination = {
+ ...pageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => this.getDeclareList(this.props));
+ },
+ onChange: current => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.getDeclareList(this.props));
+ }
+ };
+ return (
+ {
+ const { id } = record;
+ return
+
+ {getLabel(83110, "查看详情")}
+
+ {
+ showWithDrawBtn &&
+ {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(543848, "确认撤回该条数据吗?"),
+ onOk: () => this.taxdeclarationDelete(id)
+ });
+ }}
+ >
+ {getLabel(32025, "撤回")}
+
+ }
+ ;
+ }
+ }
+ ]}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/declare/declare.js b/pc4mobx/hrmSalary/pages/declare/declare.js
new file mode 100644
index 00000000..0fa5dc90
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/declare/declare.js
@@ -0,0 +1,81 @@
+/*
+ * Author: 黎永顺
+ * name: 个税申报表-重构页面
+ * Description:
+ * Date: 2023/10/12
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaHelpfulTip, WeaLocaleProvider, WeaTop } from "ecCom";
+import { Button } from "antd";
+import moment from "moment";
+import DeclareQuery from "./components/declareQuery";
+import DeclareTablelist from "./components/declareTablelist";
+import DeclareDialog from "./components/declareDialog";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("taxAgentStore")
+@observer
+class Calculate extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ queryParams: {
+ taxAgentName: "",
+ dateRange: [
+ moment(new Date()).startOf("year").format("YYYY-MM"),
+ moment(new Date()).startOf("month").format("YYYY-MM")
+ ]
+ }, isRefresh: false,
+ declareDaialog: { visible: false, title: "" }
+ };
+ this.handleDebounce = null;
+ }
+
+ renderCalculateOpts = () => {
+ const { taxAgentStore: { showOperateBtn } } = this.props;
+ const { queryParams, isRefresh } = this.state;
+ let calculateOpts = [
+ ,
+ this.setState({
+ isRefresh: _.keys(v)[0] === "taxAgentName" ? isRefresh : !isRefresh,
+ queryParams: { ...queryParams, ...v }
+ })} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
+ ];
+ return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
+ };
+
+ render() {
+ const { queryParams, isRefresh, declareDaialog } = this.state;
+ return (
+ } iconBgcolor="#F14A2D"
+ buttons={this.renderCalculateOpts()} className="declare-main-layout"
+ >
+
+
+ this.setState({
+ declareDaialog: { ...declareDaialog, visible: false },
+ isRefresh: bool === "refresh" ? !isRefresh : isRefresh
+ })}
+ />
+
+
+ );
+ }
+}
+
+export default Calculate;
diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less
index 81e72b6f..52564e0a 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.less
+++ b/pc4mobx/hrmSalary/pages/declare/index.less
@@ -24,3 +24,67 @@
}
}
}
+
+//个税申报表页面-重构
+.declare-main-layout {
+ .wea-new-top-content {
+ overflow-y: hidden;
+ }
+
+ .declare-body {
+ height: 100%;
+ width: 100%;
+ padding: 16px;
+ overflow-y: auto;
+
+ .wea-new-table {
+ background: #fff;
+ }
+
+ .ant-table-tbody {
+ td {
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+
+ }
+}
+
+.declare-dialog-layout {
+ background: #f6f6f6;
+
+ .wea-search-group {
+ padding: 16px;
+ }
+
+ .wea-select, .ant-select-selection, .ant-select {
+ width: 100%;
+ }
+
+ .wea-select {
+ display: inline-block;
+ position: relative;
+ }
+
+ .ant-select-selection {
+ height: 30px;
+ border-radius: 0;
+ }
+
+ .wea-content {
+ padding: 0;
+
+ .wea-form-cell-wrapper {
+ background: #FFF;
+ border: 1px solid #e5e5e5;
+ border-bottom: none;
+
+ .wea-form-cell {
+ border-bottom: 1px solid #e5e5e5;
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js
index cf80a323..e1691486 100644
--- a/pc4mobx/hrmSalary/stores/declare.js
+++ b/pc4mobx/hrmSalary/stores/declare.js
@@ -7,13 +7,22 @@ import * as API from "../apis/declare"; // 引入API接口文件
const { TableStore } = WeaTableNew;
export class DeclareStore {
+ @observable declareForm = new WeaForm(); //薪资核算重构-核算form
+ // ** 薪资核算重构-初始化核算form **
+ @action
+ initDeclareForm = () => this.declareForm = new WeaForm();
+
+
+
+
+
+
@observable tableStore = new TableStore(); // new table
@observable form = new WeaForm(); // nrew 一个form
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = true; // 数据加载状态
-
// 列表
@observable listDataSource = [];
@observable listColumns = [];
From d0aa6e93a01a5b5712ff14f652075588ce125aaf 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, 20 Oct 2023 10:27:00 +0800
Subject: [PATCH 02/29] =?UTF-8?q?feature/2.9.42310.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8B=93=E6=89=91=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 3 +++
.../pages/salaryItemDiagram/index.js | 22 +++++++++++++++++++
2 files changed, 25 insertions(+)
create mode 100644 pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index af5bbfb0..3311b26c 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -42,6 +42,7 @@ import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
+import SalaryItemDiagram from "./pages/salaryItemDiagram";
import stores from "./stores";
import "./style/index";
@@ -95,6 +96,7 @@ const DataAcquisition = (props) => props.children;
// reportView 薪酬报表查看
// externalPersonManage 非系统人员管理
// adjustSalaryManage 档案管理
+// salaryItemDiagram 薪资档案拓扑图
const Routes = (
+
+ );
+ }
+}
+
+export default Index;
From 235e7cc6f02de3efb09dea2966c051ab4202a782 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, 27 Oct 2023 10:43:23 +0800
Subject: [PATCH 03/29] =?UTF-8?q?feature/2.9.42310.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8B=93=E6=89=91=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 3 -
.../components/salaryEditCalc/diagramModal.js | 59 +++++++++++++++++++
.../salaryEditCalc/editCalcTable.js | 25 ++++++--
.../doCalc/components/salaryEditCalc/index.js | 2 +-
.../pages/salaryItemDiagram/index.js | 2 +-
5 files changed, 82 insertions(+), 9 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/diagramModal.js
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 3311b26c..af5bbfb0 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -42,7 +42,6 @@ import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
-import SalaryItemDiagram from "./pages/salaryItemDiagram";
import stores from "./stores";
import "./style/index";
@@ -96,7 +95,6 @@ const DataAcquisition = (props) => props.children;
// reportView 薪酬报表查看
// externalPersonManage 非系统人员管理
// adjustSalaryManage 档案管理
-// salaryItemDiagram 薪资档案拓扑图
const Routes = (
-
{
+ const { type } = data;
+ if (type === "initDiagram") this.postMessageToChild(this.props);
+ };
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ postMessageToChild = (payload = {}) => {
+ const { width, height } = this.diagramRef.state.style;
+ const i18n = {
+ "公式": getLabel(18125, "公式")
+ };
+ const childFrameObj = document.getElementById("topologyDiagram");
+ childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, width, height, i18n }), "*");
+ };
+
+ render() {
+ return (
+ this.diagramRef = dom}
+ scalable hasScroll className="diagramDialog" initLoadCss
+ title={getLabel(111, "拓扑图")}
+ style={{
+ width: 1150,
+ height: 850,
+ minHeight: 200,
+ minWidth: 380,
+ maxHeight: "90%",
+ maxWidth: "90%",
+ overflow: "hidden",
+ transform: "translate(0px, 0px)"
+ }}
+ >
+
+
+ );
+ }
+}
+
+export default DiagramModal;
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
index 36198c34..a09a5052 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
@@ -11,6 +11,7 @@ import { inject, observer } from "mobx-react";
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
import ProgressModal from "../../../../../components/progressModal";
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
+import DiagramModal from "./diagramModal";
const getLabel = WeaLocaleProvider.getLabel;
@@ -22,7 +23,8 @@ class EditCalcTable extends Component {
this.state = {
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [], progressVisible: false, progress: 0,
- salaryCalcSlide: { visible: false, id: "" }
+ salaryCalcSlide: { visible: false, id: "" },
+ diagramModal: { visible: false, salaryItemId: "", salarySobId: "" }
};
this.timerLock = null;
}
@@ -59,13 +61,24 @@ class EditCalcTable extends Component {
salaryCalcSlide: { visible: true, id: salaryCalcId }
});
break;
+ case "DIAGRAM":
+ const { salarySobId } = this.props;
+ const { diagramModal } = this.state;
+ this.setState({ diagramModal: { ...diagramModal, ...params, visible: true, salarySobId } });
+ break;
default:
break;
}
}
};
updateLockStatus = (payload) => {
- const { lockStatus } = payload;
+ const { salarySobId } = this.props;
+ const { diagramModal } = this.state;
+ const { lockStatus, salaryItemId } = payload;
+ if (lockStatus === "DIAGRAM") {
+ this.setState({ diagramModal: { ...diagramModal, visible: true, salarySobId, salaryItemId } });
+ return;
+ }
Modal.confirm({
title: getLabel(131329, "信息确认"),
content:
@@ -125,7 +138,7 @@ class EditCalcTable extends Component {
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
- "批量锁定": getLabel(111, "批量锁定")
+ "批量锁定": getLabel(111, "批量锁定"), "查看拓扑图": getLabel(111, "查看拓扑图")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
@@ -160,7 +173,7 @@ class EditCalcTable extends Component {
};
render() {
- const { loading, progressVisible, progress, salaryCalcSlide } = this.state;
+ const { loading, progressVisible, progress, salaryCalcSlide, diagramModal } = this.state;
return (
@@ -177,6 +190,10 @@ class EditCalcTable extends Component {
id: ""
}
}, () => isFresh === "true" && this.queryCalcResultList())}/>
+ {
+ diagramModal.visible &&
+ this.setState({ diagramModal: { visible: false } })}/>
+ }
{
progressVisible &&
-
this.calcTableRef = dom}
+ this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
diff --git a/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
index 6de256d3..51e16088 100644
--- a/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
@@ -13,7 +13,7 @@ class Index extends Component {
style={{ border: 0, width: "100%", height: "100%" }}
src="http://localhost:7607/#/salaryItemDiagram"
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/salaryItemDiagram"
- id="atdTable"
+ id="topologyDiagram"
/>
);
}
From eed8d3a5bdd97143c31281aa32e6e98241cbcc1a 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, 27 Oct 2023 16:14:59 +0800
Subject: [PATCH 04/29] =?UTF-8?q?feature/2.9.42310.01-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8B=93=E6=89=91=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 2 +
.../components/salaryEditCalc/diagramModal.js | 59 -------------------
.../salaryEditCalc/editCalcTable.js | 17 ++----
.../components/ledgerSalaryItemTable.js | 8 ++-
.../ledgerPage/components/ledgerSlide.js | 2 +-
.../pages/salaryItemDiagram/index.js | 4 +-
pc4mobx/hrmSalary/pages/topologyMap/index.js | 45 ++++++++++++++
7 files changed, 62 insertions(+), 75 deletions(-)
delete mode 100644 pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/diagramModal.js
create mode 100644 pc4mobx/hrmSalary/pages/topologyMap/index.js
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index af5bbfb0..115db668 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -42,6 +42,7 @@ import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview";
import ExternalPersonManage from "./pages/externalPersonManage";
import AdjustSalaryManage from "./pages/adjustSalaryManage";
+import TopologyMap from "./pages/topologyMap";
import stores from "./stores";
import "./style/index";
@@ -168,6 +169,7 @@ const Routes = (
+
);
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/diagramModal.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/diagramModal.js
deleted file mode 100644
index 8f74a8c1..00000000
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/diagramModal.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Author: 黎永顺
- * name: 薪资项目拓扑图-查看
- * Description:
- * Date: 2023/10/26
- */
-import React, { Component } from "react";
-import { WeaDialog, WeaLocaleProvider } from "ecCom";
-import SalaryItemDiagram from "../../../../salaryItemDiagram";
-
-const getLabel = WeaLocaleProvider.getLabel;
-
-class DiagramModal extends Component {
- componentDidMount() {
- window.addEventListener("message", this.handleReceive, false);
- }
-
- handleReceive = async ({ data }) => {
- const { type } = data;
- if (type === "initDiagram") this.postMessageToChild(this.props);
- };
-
- componentWillUnmount() {
- window.removeEventListener("message", this.handleReceive, false);
- }
-
- postMessageToChild = (payload = {}) => {
- const { width, height } = this.diagramRef.state.style;
- const i18n = {
- "公式": getLabel(18125, "公式")
- };
- const childFrameObj = document.getElementById("topologyDiagram");
- childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, width, height, i18n }), "*");
- };
-
- render() {
- return (
- this.diagramRef = dom}
- scalable hasScroll className="diagramDialog" initLoadCss
- title={getLabel(111, "拓扑图")}
- style={{
- width: 1150,
- height: 850,
- minHeight: 200,
- minWidth: 380,
- maxHeight: "90%",
- maxWidth: "90%",
- overflow: "hidden",
- transform: "translate(0px, 0px)"
- }}
- >
-
-
- );
- }
-}
-
-export default DiagramModal;
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
index a09a5052..9a460c53 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
@@ -11,7 +11,6 @@ import { inject, observer } from "mobx-react";
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
import ProgressModal from "../../../../../components/progressModal";
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
-import DiagramModal from "./diagramModal";
const getLabel = WeaLocaleProvider.getLabel;
@@ -23,8 +22,7 @@ class EditCalcTable extends Component {
this.state = {
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: [], progressVisible: false, progress: 0,
- salaryCalcSlide: { visible: false, id: "" },
- diagramModal: { visible: false, salaryItemId: "", salarySobId: "" }
+ salaryCalcSlide: { visible: false, id: "" }
};
this.timerLock = null;
}
@@ -63,8 +61,8 @@ class EditCalcTable extends Component {
break;
case "DIAGRAM":
const { salarySobId } = this.props;
- const { diagramModal } = this.state;
- this.setState({ diagramModal: { ...diagramModal, ...params, visible: true, salarySobId } });
+ const { salaryItemId: itemid, acctEmpId } = params;
+ window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${itemid}?acctEmpId=${acctEmpId}`, "_blank");
break;
default:
break;
@@ -73,10 +71,9 @@ class EditCalcTable extends Component {
};
updateLockStatus = (payload) => {
const { salarySobId } = this.props;
- const { diagramModal } = this.state;
const { lockStatus, salaryItemId } = payload;
if (lockStatus === "DIAGRAM") {
- this.setState({ diagramModal: { ...diagramModal, visible: true, salarySobId, salaryItemId } });
+ window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}`, "_blank");
return;
}
Modal.confirm({
@@ -173,7 +170,7 @@ class EditCalcTable extends Component {
};
render() {
- const { loading, progressVisible, progress, salaryCalcSlide, diagramModal } = this.state;
+ const { loading, progressVisible, progress, salaryCalcSlide } = this.state;
return (
@@ -190,10 +187,6 @@ class EditCalcTable extends Component {
id: ""
}
}, () => isFresh === "true" && this.queryCalcResultList())}/>
- {
- diagramModal.visible &&
- this.setState({ diagramModal: { visible: false } })}/>
- }
{
progressVisible &&
{
+ const { salarySobId, salaryItemId } = record;
+ return {text};
+ }
},
{
title:
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
index 8b2e350e..cb768c92 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
@@ -266,7 +266,7 @@ class LedgerSlide extends Component {
className="slideOuterWrapper"
visible={visible}
top={0}
- width={65}
+ width={100}
height={100}
direction="right"
measure="%"
diff --git a/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
index 51e16088..710a6387 100644
--- a/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
@@ -11,8 +11,8 @@ class Index extends Component {
return (
);
diff --git a/pc4mobx/hrmSalary/pages/topologyMap/index.js b/pc4mobx/hrmSalary/pages/topologyMap/index.js
new file mode 100644
index 00000000..9f7c1050
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/topologyMap/index.js
@@ -0,0 +1,45 @@
+/*
+ * Author: 黎永顺
+ * name: 薪资项目拓扑图-查看
+ * Description:
+ * Date: 2023/10/26
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import SalaryItemDiagram from "../salaryItemDiagram";
+import { getQueryString } from "../../util/url";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ componentDidMount() {
+ window.addEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type } = data;
+ if (type === "initDiagram") this.postMessageToChild();
+ };
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ postMessageToChild = () => {
+ const i18n = { "公式": getLabel(18125, "公式") };
+ const { params: payload = {} } = this.props;
+ const acctEmpId = getQueryString("acctEmpId");
+ const childFrameObj = document.getElementById("topologyDiagram");
+ childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, acctEmpId }), "*");
+ };
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Index;
From b14fce79495e30f97d84107d661e4b399e983044 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, 31 Oct 2023 15:30:21 +0800
Subject: [PATCH 05/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 4 +-
.../components/advanceInputBtn/index.js | 33 ++++++
.../components/advanceInputBtn/index.less | 29 +++++
.../welfareAdvanceSearchPannel/index.js | 66 +++++++++++
.../components/welfareTableList/index.js | 104 ++++++++++++++++++
.../components/welfareTip/index.js | 22 ++++
.../welfareArchive/config.js | 7 ++
.../welfareArchive/index.js | 104 ++++++++++++++++++
.../welfareArchive/index.less | 77 +++++++++++++
pc4mobx/hrmSalary/stores/archives.js | 1 +
10 files changed, 446 insertions(+), 1 deletion(-)
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 366de6cc..13e2be4c 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -3,7 +3,8 @@ import Route from "react-router/lib/Route";
import { WeaLocaleProvider } from "ecCom";
import MySalary from "./pages/mySalary";
import Programme from "./pages/socialSecurityBenefits/programme";
-import Archives from "./pages/socialSecurityBenefits/archives";
+import Archivess from "./pages/socialSecurityBenefits/archives";
+import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison";
@@ -114,6 +115,7 @@ const Routes = (
component={SocialSecurityBenefits}>
+
+ welfareForm.updateFields({ username: v })}
+ onSearch={this.props.onAdvanceSearch}
+ />
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less
new file mode 100644
index 00000000..9081d39f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less
@@ -0,0 +1,29 @@
+.achrive-advance-search {
+ display: flex;
+ align-items: center;
+ position: relative;
+ top: -1.5px;
+
+ .wea-advanced-search {
+ top: 2px;
+ left: -1px;
+ height: 28px;
+ line-height: 1;
+ border-radius: 0;
+ position: relative;
+ color: #474747;
+ padding: 4px 15px;
+ }
+
+ .wea-advanced-search:hover {
+ border: 1px solid #dadada;
+ color: #474747;
+ }
+
+ .text-elli {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ top: 1px;
+ }
+}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
new file mode 100644
index 00000000..11fb3505
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
@@ -0,0 +1,66 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利档案页面重构-高级搜索面板
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { Button } from "antd";
+import { inject, observer } from "mobx-react";
+import { getSaCondition } from "../../../../../apis/archive";
+import { getSearchs } from "../../../../../util";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("archivesStore")
+@observer
+class WelfareAdvanceSearchPannel extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ searchConditions: []
+ };
+ }
+
+ componentDidMount() {
+ getSaCondition().then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ searchConditions: data.condition
+ }, () => {
+ const { archivesStore: { welfareForm } } = this.props;
+ welfareForm.initFormFields(this.state.searchConditions);
+ });
+ }
+ });
+ }
+
+ render() {
+ const { searchConditions } = this.state;
+ const { archivesStore: { welfareForm } } = this.props;
+ return (
+
+
+ {getSearchs(welfareForm, searchConditions, 2, false)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default WelfareAdvanceSearchPannel;
+
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
new file mode 100644
index 00000000..a24c4383
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -0,0 +1,104 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利档案页面重构-列表
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider, WeaTable } from "ecCom";
+import { inject, observer } from "mobx-react";
+import { getExtTable, queryList } from "../../../../../apis/welfareArchive";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const APILIST = {
+ runStatuses: queryList,
+ ext: getExtTable
+};
+
+@inject("archivesStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [], columns: [], loading: false, pageInfo: { current: 0, pageSize: 10, total: 0 },
+ selectedRowKeys: []
+ };
+ }
+
+ componentDidMount() {
+ this.getWelfareList(this.props);
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) this.getWelfareList(nextProps);
+ }
+
+ getWelfareList = (props) => {
+ const { pageInfo } = this.state;
+ const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount } = props;
+ const params = { ...pageInfo, ...welfareForm.getFormParams() };
+ const payload = runStatuses === "ext" ? { ...params, extWelArchiveList: true } : {
+ ...params,
+ runStatuses: runStatuses.split(",")
+ };
+ this.setState({ loading: true });
+ APILIST[runStatuses === "ext" ? "ext" : "runStatuses"](payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { columns, datas: dataSource, pageInfo: { pageNum: current, pageSize, total } } = data;
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
+ columns: _.map(columns, o => {
+ const { column: dataIndex, text: title, width } = o;
+ if (dataIndex === "employeeName") {
+ return {
+ dataIndex, title, width, fixed: "left",
+ render: (txt) => ({txt})
+ };
+ } else {
+ return {
+ dataIndex, title, width,
+ render: (txt) => ({txt})
+ };
+ }
+ })
+ }, () => onChangeTopTabCount(runStatuses, total));
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ render() {
+ const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state;
+ console.log(columns);
+ const pagination = {
+ ...pageInfo,
+ showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
+ showQuickJumper: true,
+ showSizeChanger: true,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => this.getWelfareList(this.props));
+ },
+ onChange: current => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.getWelfareList(this.props));
+ }
+ };
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ };
+ return (
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
new file mode 100644
index 00000000..12ef7f84
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
@@ -0,0 +1,22 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利档案页面重构-小提示
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class Index extends Component {
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
new file mode 100644
index 00000000..7588fb29
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -0,0 +1,7 @@
+export const tabList = [
+ { viewcondition: "1", lanId: 542711, title: "待增员", showcount: true, groupid: "stayAdd" },
+ { viewcondition: "2,3", lanId: 542504, title: "在缴员工", showcount: true, groupid: "paying" },
+ { viewcondition: "3", lanId: 542713, title: "待减员", showcount: true, groupid: "stayDel" },
+ { viewcondition: "4,5", lanId: 542505, title: "停缴员工", showcount: true, groupid: "stopPay" },
+ { viewcondition: "ext", lanId: 542679, title: "非系统人员", showcount: true, groupid: "ext" }
+];
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
new file mode 100644
index 00000000..3dc5058a
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
@@ -0,0 +1,104 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利档案页面重构
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { WeaHelpfulTip, WeaLocaleProvider, WeaReqTop, WeaTab } from "ecCom";
+import { inject, observer } from "mobx-react";
+import AdvanceInputBtn from "./components/advanceInputBtn";
+import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel";
+import WelfareTableList from "./components/welfareTableList";
+import { queryInsuranceTabTotal } from "../../../apis/welfareArchive";
+import { Button } from "antd";
+import cs from "classnames";
+import { tabList } from "./config";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("taxAgentStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedKey: "1", showSearchAd: false, isQuery: false,
+ topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 }
+ };
+ }
+
+ queryInsuranceTabTotal = (active, total) => {
+ queryInsuranceTabTotal().then(({ status, data }) => {
+ if (status) {
+ const key = _.find(tabList, o => o.viewcondition === active).groupid;
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
+ });
+ }
+ });
+ };
+ renderReqBtns = () => {
+ const { selectedKey } = this.state;
+ let reqBtns = [
+ ,
+ this.setState({ showSearchAd: true })}
+ onAdvanceSearch={() => this.setState({ isQuery: !this.state.isQuery })}
+ />
+ ];
+ switch (selectedKey) {
+ case "1":
+ reqBtns.unshift(
+ {getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")}
+
+ }
+ />);
+ break;
+ default:
+ break;
+ }
+ return reqBtns;
+ };
+ onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
+
+ render() {
+ const { selectedKey, topTabCount, showSearchAd, isQuery } = this.state;
+ const { taxAgentStore: { showOperateBtn } } = this.props;
+ return (
+
+
}
+ iconBgcolor="#F14A2D" buttons={this.renderReqBtns()} showDropIcon
+ replaceTab={
+
({ ...o, title: getLabel(o.lanId, o.title) }))} autoCalculateWidth
+ keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid"
+ onChange={key => this.setState({ selectedKey: key })}
+ />
+ }
+ >
+
+
+ this.setState({ showSearchAd: false })}
+ onAdSearch={this.onAdSearch}
+ />
+
+ {/*列表*/}
+
+
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
new file mode 100644
index 00000000..35e4ca7f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -0,0 +1,77 @@
+.salary-welfare-archive {
+ min-width: 1000px;
+ overflow: auto;
+ width: 100%;
+ height: 100%;
+ background: #f6f6f6;
+
+ .wea-new-top-req-title > div:first-child > div > div {
+ padding-left: 0 !important;
+
+ .wea-tab {
+ border-bottom: none;
+ }
+ }
+
+ .salary-welfare-archive-content {
+ padding: 8px 16px;
+ height: 100%;
+
+ .wea-new-table {
+ background: #ffffff;
+
+ .ant-table-tbody {
+ td {
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+ }
+
+ .searchAdvanced-condition-hide {
+ display: none;
+ }
+
+ .searchAdvanced-condition-container {
+ background: #FFF;
+ margin-bottom: 10px;
+ border: 1px solid #e5e5e5;
+
+ .wea-search-buttons {
+ border-top: 1px solid #dadada;
+ padding: 15px 0;
+ }
+
+ .wea-advanced-searchsAd {
+ height: 320px;
+ overflow: hidden auto;
+
+ .formItem-delete {
+ position: absolute;
+ top: 0;
+ right: -40px;
+ }
+
+ .searchAdvanced-commonSelect {
+ border-top: 1px solid #ebebeb;
+ margin: 0 25px;
+ padding: 10px 0;
+ }
+
+ .custom-advance-largeSpacing {
+ padding-left: 26px;
+
+ .link {
+ border: none;
+ border-radius: 0;
+ padding: 12px 10px 12px 26px;
+ color: #2db7f5
+ }
+ }
+
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 096a5ab7..5eeda9c0 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -9,6 +9,7 @@ const { TableStore } = WeaTableNew;
export class ArchivesStore {
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
+ @observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form
From c068959e73a59b51b41c97396c94e6f48b4c7b7f 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, 31 Oct 2023 16:59:50 +0800
Subject: [PATCH 06/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareTableList/index.js | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index a24c4383..a87ffd25 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -56,12 +56,11 @@ class Index extends Component {
dataIndex, title, width, fixed: "left",
render: (txt) => ({txt})
};
- } else {
- return {
- dataIndex, title, width,
- render: (txt) => ({txt})
- };
}
+ return {
+ dataIndex, title, width,
+ render: (txt) => ({txt})
+ };
})
}, () => onChangeTopTabCount(runStatuses, total));
}
@@ -70,7 +69,6 @@ class Index extends Component {
render() {
const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state;
- console.log(columns);
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
@@ -94,8 +92,12 @@ class Index extends Component {
};
return (
(123)
+ }]}
/>
);
}
From b2dda3a728efe6dd20e07d6922c94837ad9b0533 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, 1 Nov 2023 09:10:28 +0800
Subject: [PATCH 07/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareArchive/components/welfareTableList/index.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index a87ffd25..aa7993ad 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -6,6 +6,7 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
+import {Table} from "antd"
import { inject, observer } from "mobx-react";
import { getExtTable, queryList } from "../../../../../apis/welfareArchive";
@@ -91,7 +92,7 @@ class Index extends Component {
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
};
return (
-
Date: Wed, 1 Nov 2023 16:18:51 +0800
Subject: [PATCH 08/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareTableList/index.js | 98 +++++++++++--------
.../components/welfareTip/index.js | 10 +-
.../welfareArchive/config.js | 78 +++++++++++++++
.../welfareArchive/index.js | 6 +-
.../welfareArchive/index.less | 41 ++++++--
5 files changed, 180 insertions(+), 53 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index aa7993ad..60cb2d50 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -5,8 +5,8 @@
* Date: 2023/10/31
*/
import React, { Component } from "react";
-import { WeaLocaleProvider, WeaTable } from "ecCom";
-import {Table} from "antd"
+import { WeaLocaleProvider } from "ecCom";
+import { Spin } from "antd";
import { inject, observer } from "mobx-react";
import { getExtTable, queryList } from "../../../../../apis/welfareArchive";
@@ -22,19 +22,43 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- dataSource: [], columns: [], loading: false, pageInfo: { current: 0, pageSize: 10, total: 0 },
+ dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
selectedRowKeys: []
};
}
componentDidMount() {
- this.getWelfareList(this.props);
+ window.addEventListener("message", this.handleReceive, false);
+ }
+
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
}
componentWillReceiveProps(nextProps, nextContext) {
- if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) this.getWelfareList(nextProps);
+ if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) {
+ this.setState({
+ pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
+ }, () => this.getWelfareList(nextProps));
+ }
}
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ this.getWelfareList(this.props);
+ } else if (type === "turn") {
+ switch (id) {
+ case "PAGEINFO":
+ this.setState({
+ pageInfo: { ...this.state.pageInfo, ...params }
+ }, () => this.getWelfareList(this.props));
+ break;
+ default:
+ break;
+ }
+ }
+ };
getWelfareList = (props) => {
const { pageInfo } = this.state;
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount } = props;
@@ -54,52 +78,46 @@ class Index extends Component {
const { column: dataIndex, text: title, width } = o;
if (dataIndex === "employeeName") {
return {
- dataIndex, title, width, fixed: "left",
- render: (txt) => ({txt})
+ dataIndex, title, width, fixed: "left", ellipsis: true
};
}
return {
- dataIndex, title, width,
- render: (txt) => ({txt})
+ dataIndex, title, width, ellipsis: true
};
})
- }, () => onChangeTopTabCount(runStatuses, total));
+ }, () => {
+ const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
+ onChangeTopTabCount(runStatuses, total);
+ this.postMessageToChild({
+ dataSource, pageInfo, selectedRowKeys, runStatuses,
+ columns
+ });
+ });
}
}).catch(() => this.setState({ loading: false }));
};
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"),
+ "共": getLabel(18609, "共"), "条": getLabel(18256, "条")
+ };
+ const childFrameObj = document.getElementById("atdTable");
+ childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ };
render() {
- const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state;
- const pagination = {
- ...pageInfo,
- showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
- showQuickJumper: true,
- showSizeChanger: true,
- pageSizeOptions: ["10", "20", "50", "100"],
- onShowSizeChange: (current, pageSize) => {
- this.setState({
- pageInfo: { ...pageInfo, current, pageSize }
- }, () => this.getWelfareList(this.props));
- },
- onChange: current => {
- this.setState({
- pageInfo: { ...pageInfo, current }
- }, () => this.getWelfareList(this.props));
- }
- };
- const rowSelection = {
- selectedRowKeys,
- onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
- };
+ const { loading, dataSource } = this.state;
return (
- (123)
- }]}
- />
+
+
+
+
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
index 12ef7f84..81e1e043 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
@@ -11,9 +11,15 @@ const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
render() {
+ const { dataSource } = this.props;
return (
-
-
+
+
{getLabel(543177, "小提示")}
+
+ {
+ _.map(dataSource, item => (
{getLabel(item.lanId, item.title)}
))
+ }
+
);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 7588fb29..52e50e5c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -5,3 +5,81 @@ export const tabList = [
{ viewcondition: "4,5", lanId: 542505, title: "停缴员工", showcount: true, groupid: "stopPay" },
{ viewcondition: "ext", lanId: 542679, title: "非系统人员", showcount: true, groupid: "ext" }
];
+export const welfareTipList = [
+ {
+ viewcondition: "1",
+ list: [
+ {
+ lanId: 544349,
+ title: "1、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;"
+ },
+ {
+ lanId: 544350,
+ title: "2、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;"
+ },
+ {
+ lanId: 544351,
+ title: "3、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;"
+ },
+ {
+ lanId: 544352,
+ title: "4、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;"
+ },
+ {
+ lanId: 544353,
+ title: "5、增员失败情况:①终止缴纳月小于等于当前月;②方案或起始缴纳月未维护;"
+ }
+ ]
+ },
+ {
+ viewcondition: "2,3",
+ list: [
+ {
+ lanId: 544358,
+ title: "1、需缴纳社保福利的员工维护在【在缴员工】;"
+ },
+ {
+ lanId: 544359,
+ title: "2、可使用更新导入,调整档案数据;"
+ },
+ {
+ lanId: 544360,
+ title: "3、若维护了最后缴纳月且小于等于当前月,则自动进入【待减员】;"
+ },
+ {
+ lanId: 544361,
+ title: "4、核算人员范围为,【在缴员工】中的起始缴纳月和最后缴纳月区间包含当前月的人员;"
+ }
+ ]
+ },
+ {
+ viewcondition: "3",
+ list: [
+ {
+ lanId: 544355,
+ title: "1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;"
+ },
+ {
+ lanId: 544356,
+ title: "2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;"
+ },
+ {
+ lanId: 544357,
+ title: "3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;"
+ }
+ ]
+ },
+ {
+ viewcondition: "4,5",
+ list: [
+ {
+ lanId: 544354,
+ title: "1、不需要缴纳社保福利的员工,保存在【停缴员工】;"
+ }
+ ]
+ },
+ {
+ viewcondition: "ext",
+ list: []
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
index 3dc5058a..265a2548 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
@@ -10,10 +10,11 @@ import { inject, observer } from "mobx-react";
import AdvanceInputBtn from "./components/advanceInputBtn";
import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel";
import WelfareTableList from "./components/welfareTableList";
+import WelfareTip from "./components/welfareTip";
import { queryInsuranceTabTotal } from "../../../apis/welfareArchive";
+import { tabList, welfareTipList } from "./config";
import { Button } from "antd";
import cs from "classnames";
-import { tabList } from "./config";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -68,6 +69,7 @@ class Index extends Component {
render() {
const { selectedKey, topTabCount, showSearchAd, isQuery } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
+ const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
return (
+ {/*提示*/}
+ {!_.isEmpty(tipList) && }
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index 35e4ca7f..671a7df5 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -15,18 +15,14 @@
.salary-welfare-archive-content {
padding: 8px 16px;
- height: 100%;
+ display: flex;
+ flex-direction: column;
- .wea-new-table {
- background: #ffffff;
+ .table-layout {
+ min-height: 220px;
- .ant-table-tbody {
- td {
- width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
}
}
@@ -74,4 +70,29 @@
}
}
}
+
+ .tip-info-area {
+ margin-top: 16px;
+ width: 100%;
+ border: 1px solid #e5e5e5;
+ border-radius: 4px;
+ overflow: hidden;
+
+ .title {
+ height: 40px;
+ line-height: 40px;
+ border-bottom: 1px solid #e5e5e5;
+ padding: 0 16px;
+ }
+
+ .tip-detail {
+ padding: 16px;
+ background: #fff;
+
+ .tip-item {
+ line-height: 24px;
+ font-size: 12px;
+ }
+ }
+ }
}
From 8a3a1dcf7615b7462ebffe092998de09c784d2ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 2 Nov 2023 09:18:16 +0800
Subject: [PATCH 09/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareTableList/index.js | 13 ++++++++++++-
.../welfareArchive/index.less | 2 --
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 60cb2d50..b520db28 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -29,10 +29,16 @@ class Index extends Component {
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
+ window.addEventListener("resize", this.handleResize, false);
}
+ handleResize = () => {
+ this.forceUpdate();
+ };
+
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
+ window.removeEventListener("resize", this.handleResize, false);
}
componentWillReceiveProps(nextProps, nextContext) {
@@ -107,8 +113,13 @@ class Index extends Component {
render() {
const { loading, dataSource } = this.state;
+ const dom = document.querySelector(".wea-new-top-req-content");
+ let height = 280;
+ if (dom && dataSource.length > 0) {
+ height = (parseFloat(dom.style.height) > 620 && dataSource.length === 10) ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 170;
+ }
return (
-
+
}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index c4e5b310..bdaabe71 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -5,9 +5,10 @@
* Date: 2023/10/31
*/
import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import { message, Modal, Spin } from "antd";
-import { inject, observer } from "mobx-react";
+import WelfareEditArchiveSlide from "../welfareEditArchiveSlide";
import * as API from "../../../../../apis/welfareArchive";
const getLabel = WeaLocaleProvider.getLabel;
@@ -28,8 +29,9 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
- selectedRowKeys: []
+ dataSource: [], columns: [], loading: false, selectedRowKeys: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ welfareEditSlide: { visible: false, employeeId: "", welfareTypeEnum: "", paymentOrganization: "" }
};
}
@@ -65,7 +67,7 @@ class Index extends Component {
if (type === "init") {
this.getWelfareList(this.props);
} else if (type === "turn") {
- const { record: { baseInfo } = {}, interfaceParams = {} } = params;
+ const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
switch (id) {
case "PAGEINFO":
this.setState({
@@ -76,6 +78,15 @@ class Index extends Component {
const { selectedRowKeys } = params;
this.setState({ selectedRowKeys });
break;
+ case "EDIT":
+ case "VIEW":
+ this.setState({
+ welfareEditSlide: {
+ ...this.state.welfareEditSlide, visible: true,
+ employeeId, paymentOrganization
+ }
+ });
+ break;
case "ADD-TO-PAY":
case "STAY-DEL-TO-STOP":
case "CANCEL-STOP":
@@ -184,7 +195,7 @@ class Index extends Component {
};
render() {
- const { loading, dataSource } = this.state;
+ const { loading, dataSource, welfareEditSlide } = this.state;
const dom = document.querySelector(".wea-new-top-req-content");
let height = 280;
if (dom && dataSource.length > 0) {
@@ -200,6 +211,11 @@ class Index extends Component {
id="atdTable"
/>
+ {/* 编辑产看员工福利档案*/}
+
this.setState({
+ welfareEditSlide: { ...welfareEditSlide, visible: false }
+ })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 8ff122fb..f191cba4 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -8,6 +8,11 @@ import { CancelHelpfulDiv, HelpfulDiv } from "./components/welfareTip";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
//批量操作列表
+export const welfareTypeEnum = {
+ social: "SOCIAL_SECURITY",
+ fund: "ACCUMULATION_FUND",
+ others: "OTHER"
+};
export const optTypeEnum = [
//批量增员
{
@@ -362,3 +367,94 @@ export const getLogSearchsForm = (form, condition, onSearch = () => void (0)) =>
});
return group;
};
+export const welfareConditions = [
+ {
+ defaultshow: true,
+ title: "basic",
+ col: 3,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["username"],
+ fieldcol: 14,
+ label: "姓名",
+ lanId: 25034,
+ labelcol: 10,
+ value: "",
+ viewAttr: 1
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["department"],
+ fieldcol: 14,
+ label: "部门",
+ lanId: 27511,
+ labelcol: 10,
+ value: "",
+ viewAttr: 1
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["position"],
+ fieldcol: 14,
+ label: "岗位",
+ lanId: 6086,
+ labelcol: 10,
+ value: "",
+ viewAttr: 1
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["telephone"],
+ fieldcol: 14,
+ label: "手机号",
+ lanId: 125238,
+ labelcol: 10,
+ value: "",
+ viewAttr: 1
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["hiredate"],
+ fieldcol: 14,
+ label: "入职日期",
+ lanId: 1516,
+ labelcol: 10,
+ value: "",
+ viewAttr: 1
+ }
+ ]
+ }
+];
+export const getWelfareSearchsForm = (form, condition, onSearch = () => void (0)) => {
+ const { isFormInit } = form;
+ const formParams = form.getFormParams();
+ let group = [];
+ isFormInit && condition && condition.map(c => {
+ let items = [];
+ c.items.map(fields => {
+ items.push({
+ com: (
+
+
+ ),
+ colSpan: 1,
+ hide: fields.hide
+ });
+ });
+ group.push(
+ );
+ });
+ return group;
+};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index 28b307bd..ae320434 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -1,3 +1,9 @@
+.zIndex0-welfare-archive {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+}
+
.salary-welfare-archive {
min-width: 1000px;
overflow: auto;
@@ -94,3 +100,72 @@
}
}
}
+
+.salary-welfare-archive-edit-layout {
+
+ .titleDialog {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 46px 0 16px;
+
+ .titleCol {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ }
+
+ .titleLeftBox {
+ .titleIcon {
+ color: #fff;
+ margin: 0;
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ font-size: 22px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #F14A2D;
+ border-radius: 50%;
+ }
+
+ .title {
+ font-size: 14px;
+ color: #333;
+ padding-left: 6px;
+ }
+ }
+
+ .titleRightBox {
+ justify-content: flex-end;
+ }
+ }
+
+ .wea-slide-modal-title {
+ border-bottom: 1px solid #e5e5e5 !important;
+ }
+
+ .wea-slide-modal-content {
+ height: 100%;
+
+ .salary-welfare-archive-edit-area {
+ background: #f6f6f6;
+ height: 100%;
+ overflow-y: auto;
+ padding: 16px;
+
+ .wea-search-group, .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 5px 16px;
+ }
+ }
+
+ .wea-form-cell-wrapper {
+ background: #FFF;
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 5eeda9c0..8275da65 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -10,10 +10,8 @@ const { TableStore } = WeaTableNew;
export class ArchivesStore {
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
@observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form
-
-
-
-
+ @observable welfareProfileForm = new WeaForm(); // 社保福利档案重构-员工薪资档案form
+ @action initWelfareProfileForm = () => this.welfareProfileForm = new WeaForm();
@observable tableStore = new TableStore(
From 675d5835575eaa9b18b5e6a484f4b92caf157925 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, 7 Nov 2023 16:57:47 +0800
Subject: [PATCH 15/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareArchive/index.less | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index ae320434..8d9e0c5e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -165,6 +165,20 @@
.wea-form-cell-wrapper {
background: #FFF;
+ border: 1px solid #e5e5e5;
+
+ & > div:nth-child(1), & > div:nth-child(2) {
+ border-right: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(3) {
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(4), & > div:nth-child(5) {
+ border-right: 1px solid #e5e5e5;
+ }
}
}
}
From 8162e0279692572eb06bde519193d63a0fd0031d 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, 7 Nov 2023 19:13:38 +0800
Subject: [PATCH 16/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 40 ++++++++-
.../components/welfareTableList/index.js | 17 +++-
.../welfareArchive/config.js | 88 ++++++++++++++++++-
.../welfareArchive/index.less | 34 ++++---
4 files changed, 161 insertions(+), 18 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 8a3a9a88..d5611b1d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -8,7 +8,9 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import * as API from "../../../../../apis/welfareArchive";
+import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
import { getWelfareSearchsForm, welfareConditions } from "../../config";
+import { getConditionDomkeys } from "../../../../../util";
import { Button } from "antd";
const getKey = WeaTools.getKey;
@@ -35,9 +37,10 @@ class Index extends Component {
}
}
- getBaseForm = (props) => {
- const { employeeId, paymentOrganization, welfareTypeEnum } = props;
- const payload = { employeeId, paymentOrganization, welfareTypeEnum };
+ getBaseForm = async (props) => {
+ const { data: taxAgentList } = await getTaxAgentSelectList();
+ const { employeeId, paymentOrganization, socialItems } = props;
+ const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
@@ -50,6 +53,30 @@ class Index extends Component {
return { ...g, label: getLabel(g.lanId, g.label) };
})
};
+ } else if (o.title === "taxAgent") {
+ return {
+ ...o, title: getLabel(537996, "个税扣缴义务人"),
+ items: _.map(o.items, g => {
+ return {
+ ...g, label: getLabel(g.lanId, g.label),
+ options: _.map(taxAgentList, j => ({ key: j.id, showname: j.content }))
+ };
+ })
+ };
+ } else if (o.title === "social") {
+ console.log(props);
+ return {
+ ...o, title: getLabel(543194, "社保基础信息"),
+ items: _.map(o.items, g => {
+ if (getKey(g) === "socialSchemeId" || getKey(g) === "underTake") {
+ return {
+ ...g, label: getLabel(g.lanId, g.label),
+ options: _.find(socialItems, j => j.domkey[0] === getKey(g)).options
+ };
+ }
+ return { ...g, label: getLabel(g.lanId, g.label) };
+ })
+ };
}
return {
...o, items: _.map(o.items, g => {
@@ -61,6 +88,13 @@ class Index extends Component {
const { archivesStore: { welfareProfileForm } } = props;
console.log(this.state.conditions);
welfareProfileForm.initFormFields(this.state.conditions);
+ _.map(getConditionDomkeys(this.state.conditions), k => {
+ if (k === "paymentOrganization") {
+ welfareProfileForm.updateFields({ [k]: paymentOrganization.toString() });
+ } else {
+ welfareProfileForm.updateFields({ [k]: result[k] || "" });
+ }
+ });
});
}
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index bdaabe71..b3532e91 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -10,6 +10,7 @@ import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import { message, Modal, Spin } from "antd";
import WelfareEditArchiveSlide from "../welfareEditArchiveSlide";
import * as API from "../../../../../apis/welfareArchive";
+import { welfareTypeEnum } from "../../config";
const getLabel = WeaLocaleProvider.getLabel;
const APILIST = {
@@ -80,10 +81,19 @@ class Index extends Component {
break;
case "EDIT":
case "VIEW":
+ const payload = { employeeId, paymentOrganization };
+ const [socialItems, fundItems, othersItems] = await Promise.all([
+ this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"] }),
+ this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"] }),
+ this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"] })
+ ]);
this.setState({
welfareEditSlide: {
...this.state.welfareEditSlide, visible: true,
- employeeId, paymentOrganization
+ employeeId, paymentOrganization,
+ socialItems: socialItems.data.items[0].items,
+ fundItems: fundItems.data.items[0].items,
+ othersItems: othersItems.data.items[0].items
}
});
break;
@@ -108,6 +118,11 @@ class Index extends Component {
}
}
};
+ getProfileTypeForm = async (props) => {
+ const { employeeId, paymentOrganization, welfareTypeEnum } = props;
+ const payload = { employeeId, paymentOrganization, welfareTypeEnum };
+ return API.getBaseForm(payload);
+ };
getWelfareList = (props) => {
const { pageInfo } = this.state;
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index f191cba4..daf8b50e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -429,6 +429,91 @@ export const welfareConditions = [
viewAttr: 1
}
]
+ },
+ {
+ defaultshow: true,
+ title: "taxAgent",
+ col: 1,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["paymentOrganization"],
+ fieldcol: 16,
+ label: "个税扣缴义务人",
+ lanId: 537996,
+ labelcol: 8,
+ value: "",
+ options: [],
+ viewAttr: 1
+ }
+ ]
+ },
+ {
+ defaultshow: true,
+ title: "social",
+ col: 2,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["socialSchemeId"],
+ fieldcol: 14,
+ label: "社保方案名称",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["underTake"],
+ fieldcol: 14,
+ label: "社保个人实际承担方",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["socialStartTime"],
+ fieldcol: 14,
+ label: "社保起始缴纳月",
+ lanId: 542507,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["schemeAccount"],
+ fieldcol: 14,
+ label: "社保账号",
+ lanId: 81594,
+ labelcol: 10,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["socialEndTime"],
+ fieldcol: 14,
+ label: "社保最后缴纳月",
+ lanId: 542508,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ }
+ ]
}
];
export const getWelfareSearchsForm = (form, condition, onSearch = () => void (0)) => {
@@ -453,7 +538,8 @@ export const getWelfareSearchsForm = (form, condition, onSearch = () => void (0)
});
group.push(
);
});
return group;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index 8d9e0c5e..1ae8b8c6 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -155,30 +155,38 @@
overflow-y: auto;
padding: 16px;
+ .basic-welfare-info-wrapper {
+ .wea-form-cell-wrapper {
+ & > div:nth-child(1), & > div:nth-child(2) {
+ border-right: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(3) {
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(4), & > div:nth-child(5) {
+ border-right: 1px solid #e5e5e5;
+ }
+ }
+ }
+
.wea-search-group, .wea-form-cell {
padding: 0;
.wea-form-item {
padding: 5px 16px;
+
+ .wea-form-item-label {
+ color: #666;
+ }
}
}
.wea-form-cell-wrapper {
background: #FFF;
border: 1px solid #e5e5e5;
-
- & > div:nth-child(1), & > div:nth-child(2) {
- border-right: 1px solid #e5e5e5;
- border-bottom: 1px solid #e5e5e5;
- }
-
- & > div:nth-child(3) {
- border-bottom: 1px solid #e5e5e5;
- }
-
- & > div:nth-child(4), & > div:nth-child(5) {
- border-right: 1px solid #e5e5e5;
- }
}
}
}
From 1eac37cd38de34819460b751edec363f6cec424b 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, 8 Nov 2023 13:37:33 +0800
Subject: [PATCH 17/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 63 ++++++--
.../components/welfareTableList/index.js | 9 +-
.../welfareArchive/config.js | 153 +++++++++++++++++-
.../welfareArchive/index.less | 17 ++
pc4mobx/hrmSalary/stores/archives.js | 7 +-
5 files changed, 223 insertions(+), 26 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index d5611b1d..b4bf9e84 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -11,7 +11,7 @@ import * as API from "../../../../../apis/welfareArchive";
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
import { getWelfareSearchsForm, welfareConditions } from "../../config";
import { getConditionDomkeys } from "../../../../../util";
-import { Button } from "antd";
+import { Button, Modal } from "antd";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -22,7 +22,7 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, conditions: []
+ loading: false, conditions: [], formData: {}
};
}
@@ -31,7 +31,7 @@ class Index extends Component {
document.querySelector(".salary-welfare-archive").classList.add("zIndex0-welfare-archive");
this.getBaseForm(nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
- const { archivesStore: { initWelfareProfileForm } } = nextProps;
+ const { archivesStore: { initWelfareProfileForm, setHasBeenModify } } = nextProps;
document.querySelector(".salary-welfare-archive").classList.remove("zIndex0-welfare-archive");
initWelfareProfileForm();
}
@@ -39,12 +39,17 @@ class Index extends Component {
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
- const { employeeId, paymentOrganization, socialItems } = props;
+ const {
+ archivesStore: { welfareProfileForm },
+ employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
+ } = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
+ const formData = { ...result, ...socialBaseData, ...fundBaseData, ...othersBaseData };
this.setState({
+ formData,
conditions: _.map(welfareConditions, o => {
if (o.title === "basic") {
return {
@@ -63,15 +68,16 @@ class Index extends Component {
};
})
};
- } else if (o.title === "social") {
- console.log(props);
+ } else if (o.title === "social" || o.title === "fund" || o.title === "others") {
+ const title = o.title === "social" ? getLabel(543194, "社保基础信息") : o.title === "fund" ? getLabel(543197, "公积金基础信息") : getLabel(543198, "其他福利基础信息");
return {
- ...o, title: getLabel(543194, "社保基础信息"),
+ ...o, title,
items: _.map(o.items, g => {
- if (getKey(g) === "socialSchemeId" || getKey(g) === "underTake") {
+ if (getKey(g) === "socialSchemeId" || getKey(g) === "fundSchemeId" || getKey(g) === "otherSchemeId" || _.lowerCase(getKey(g)).indexOf("take") !== -1) {
+ const key = _.lowerCase(getKey(g)).indexOf("take") !== -1 ? "underTake" : getKey(g);
return {
...g, label: getLabel(g.lanId, g.label),
- options: _.find(socialItems, j => j.domkey[0] === getKey(g)).options
+ options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options
};
}
return { ...g, label: getLabel(g.lanId, g.label) };
@@ -85,20 +91,31 @@ class Index extends Component {
};
})
}, () => {
- const { archivesStore: { welfareProfileForm } } = props;
- console.log(this.state.conditions);
+ console.log(this.state.conditions, props, formData);
welfareProfileForm.initFormFields(this.state.conditions);
_.map(getConditionDomkeys(this.state.conditions), k => {
if (k === "paymentOrganization") {
welfareProfileForm.updateFields({ [k]: paymentOrganization.toString() });
+ } else if (_.lowerCase(k).indexOf("social") !== -1 || k === "schemeAccount") {
+ welfareProfileForm.updateFields({ [k]: formData["SOCIAL_SECURITY"][k] ? formData["SOCIAL_SECURITY"][k].toString() : "" });
+ } else if (_.lowerCase(k).indexOf("fund") !== -1) {
+ welfareProfileForm.updateFields({ [k]: formData["ACCUMULATION_FUND"][k] ? formData["ACCUMULATION_FUND"][k].toString() : "" });
+ } else if (_.lowerCase(k).indexOf("other") !== -1) {
+ welfareProfileForm.updateFields({ [k]: formData["OTHER"][k] ? formData["OTHER"][k].toString() : "" });
} else {
- welfareProfileForm.updateFields({ [k]: result[k] || "" });
+ welfareProfileForm.updateFields({ [k]: formData[k] || "" });
}
});
});
}
});
};
+ handleFormChange = (val) => {
+ const changeKey = _.keys(val)[0];
+ const { archivesStore: { setHasBeenModify } } = this.props;
+ console.log(val, changeKey);
+ setHasBeenModify(true);
+ };
renderTitle = () => {
const { loading } = this.state;
return
@@ -111,17 +128,31 @@ class Index extends Component {
;
};
+ handleClose = () => {
+ const { archivesStore: { hasBeenModify }, onClose } = this.props;
+ if (hasBeenModify) {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(111, "确定放弃填写吗?放弃后数据将不会被保存!"),
+ onOk: () => {
+ onClose();
+ }
+ });
+ } else {
+ onClose();
+ }
+ };
render() {
const { archivesStore: { welfareProfileForm } } = this.props;
- const { conditions } = this.state;
+ const { conditions, formData } = this.state;
return (
- {getWelfareSearchsForm(welfareProfileForm, conditions)}
+ {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData)}
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index b3532e91..74260961 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -92,8 +92,15 @@ class Index extends Component {
...this.state.welfareEditSlide, visible: true,
employeeId, paymentOrganization,
socialItems: socialItems.data.items[0].items,
+ socialBaseData: {
+ SOCIAL_SECURITY: { ...socialItems.data.data, socialUnderTake: socialItems.data.data.underTake }
+ },
fundItems: fundItems.data.items[0].items,
- othersItems: othersItems.data.items[0].items
+ fundBaseData: {
+ ACCUMULATION_FUND: { ...fundItems.data.data, fundUnderTake: fundItems.data.data.underTake }
+ },
+ othersItems: othersItems.data.items[0].items,
+ othersBaseData: { OTHER: { ...othersItems.data.data, otherUnderTake: othersItems.data.data.underTake } }
}
});
break;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index daf8b50e..7e991801 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -1,5 +1,5 @@
import React from "react";
-import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
+import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
import { Button } from "antd";
import AdvanceInputBtn from "./components/advanceInputBtn";
@@ -451,8 +451,8 @@ export const welfareConditions = [
},
{
defaultshow: true,
- title: "social",
- col: 2,
+ title: "social", typename: "SOCIAL_SECURITY",
+ col: 2, showPaid: true,
items: [
{
colSpan: 3,
@@ -469,7 +469,7 @@ export const welfareConditions = [
{
colSpan: 3,
conditionType: "SELECT",
- domkey: ["underTake"],
+ domkey: ["socialUnderTake"],
fieldcol: 14,
label: "社保个人实际承担方",
lanId: 111,
@@ -514,9 +514,145 @@ export const welfareConditions = [
viewAttr: 2
}
]
+ },
+ {
+ defaultshow: true,
+ title: "fund", typename: "ACCUMULATION_FUND",
+ col: 2, showPaid: true,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["fundSchemeId"],
+ fieldcol: 14,
+ label: "公积金方案名称",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["fundUnderTake"],
+ fieldcol: 14,
+ label: "公积金个人实际承担方",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["fundStartTime"],
+ fieldcol: 14,
+ label: "公积金起始缴纳月",
+ lanId: 542509,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["fundAccount"],
+ fieldcol: 14,
+ label: "公积金账号",
+ lanId: 542268,
+ labelcol: 10,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["fundEndTime"],
+ fieldcol: 14,
+ label: "公积金最后缴纳月",
+ lanId: 542510,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "INPUT",
+ domkey: ["supplementFundAccount"],
+ fieldcol: 14,
+ label: "补充公积金账号",
+ lanId: 542270,
+ labelcol: 10,
+ value: "",
+ viewAttr: 2
+ }
+ ]
+ },
+ {
+ defaultshow: true,
+ title: "others", typename: "OTHER",
+ col: 2, showPaid: true,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["otherSchemeId"],
+ fieldcol: 14,
+ label: "其它福利名称",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["otherUnderTake"],
+ fieldcol: 14,
+ label: "其它福利个人实际承担方",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["otherStartTime"],
+ fieldcol: 14,
+ label: "其他福利起始缴纳月",
+ lanId: 542511,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "MONTHPICKER",
+ domkey: ["otherEndTime"],
+ fieldcol: 14,
+ label: "其他福利最后缴纳月",
+ lanId: 542512,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ }
+ ]
}
];
-export const getWelfareSearchsForm = (form, condition, onSearch = () => void (0)) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload) => {
+ const CustomComponent = ({ type }) => {
+ const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
+ return ;
+ };
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -530,15 +666,16 @@ export const getWelfareSearchsForm = (form, condition, onSearch = () => void (0)
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom"
>
-
+
),
colSpan: 1,
hide: fields.hide
});
});
group.push(
- : }
className={c.col === 3 ? "basic-welfare-info-wrapper" : c.col === 2 ? "twoColumns-welfare-info-wrapper" : ""}
/>);
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index 1ae8b8c6..4b57066d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -172,6 +172,23 @@
}
}
+ .twoColumns-welfare-info-wrapper {
+ .wea-form-cell-wrapper {
+ & > div:nth-child(1), & > div:nth-child(3) {
+ border-right: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(2), & > div:nth-child(4) {
+ border-bottom: 1px solid #e5e5e5;
+ }
+
+ & > div:nth-child(5) {
+ border-right: 1px solid #e5e5e5;
+ }
+ }
+ }
+
.wea-search-group, .wea-form-cell {
padding: 0;
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 8275da65..f7a503ad 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -11,7 +11,12 @@ export class ArchivesStore {
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
@observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form
@observable welfareProfileForm = new WeaForm(); // 社保福利档案重构-员工薪资档案form
- @action initWelfareProfileForm = () => this.welfareProfileForm = new WeaForm();
+ @action initWelfareProfileForm = () => {
+ this.hasBeenModify = false;
+ this.welfareProfileForm = new WeaForm();
+ };
+ @observable hasBeenModify = false; //社保福利档案-员工薪资档数据-是否修改过
+ @action setHasBeenModify = (v) => this.hasBeenModify = v;//设置社保福利档案-员工薪资档数据
@observable tableStore = new TableStore(
From aa1cef89b2822f5c1d4b6e0c6a75a3c065a98897 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 9 Nov 2023 13:52:54 +0800
Subject: [PATCH 18/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 3 ++-
.../components/welfareTableList/index.js | 21 +++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index b4bf9e84..ffeb9a2d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -40,10 +40,11 @@ class Index extends Component {
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
const {
- archivesStore: { welfareProfileForm },
+ archivesStore: { welfareProfileForm }, socialBase, fundBase, othersBase,
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
+ console.log(props);
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 74260961..0fed894a 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -102,6 +102,22 @@ class Index extends Component {
othersItems: othersItems.data.items[0].items,
othersBaseData: { OTHER: { ...othersItems.data.data, otherUnderTake: othersItems.data.data.underTake } }
}
+ }, async () => {
+ const { socialBaseData, fundBaseData, othersBaseData } = this.state.welfareEditSlide;
+ const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData,
+ { ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData,
+ { OTHER: { otherSchemeId } } = othersBaseData;
+ const [socialBase, fundBase, othersBase] = await Promise.all([
+ this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"], schemeId: socialSchemeId }),
+ this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"], schemeId: fundSchemeId }),
+ this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"], schemeId: otherSchemeId })
+ ]);
+ this.setState({
+ welfareEditSlide: {
+ ...this.state.welfareEditSlide,
+ socialBase: socialBase.data, fundBase: fundBase.data, othersBase: othersBase.data
+ }
+ },()=>console.log(this.state.welfareEditSlide));
});
break;
case "ADD-TO-PAY":
@@ -130,6 +146,11 @@ class Index extends Component {
const payload = { employeeId, paymentOrganization, welfareTypeEnum };
return API.getBaseForm(payload);
};
+ getPaymentForm = async (props) => {
+ const { employeeId, paymentOrganization, welfareTypeEnum } = props;
+ const payload = { employeeId, paymentOrganization, welfareTypeEnum };
+ return API.getPaymentForm(payload);
+ };
getWelfareList = (props) => {
const { pageInfo } = this.state;
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
From f0f4bfb877ff99ca063ec50308ed585f82fe32f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 9 Nov 2023 13:54:34 +0800
Subject: [PATCH 19/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareArchive/components/welfareTableList/index.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 0fed894a..42ccdf73 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -89,8 +89,7 @@ class Index extends Component {
]);
this.setState({
welfareEditSlide: {
- ...this.state.welfareEditSlide, visible: true,
- employeeId, paymentOrganization,
+ ...this.state.welfareEditSlide, employeeId, paymentOrganization,
socialItems: socialItems.data.items[0].items,
socialBaseData: {
SOCIAL_SECURITY: { ...socialItems.data.data, socialUnderTake: socialItems.data.data.underTake }
@@ -114,10 +113,10 @@ class Index extends Component {
]);
this.setState({
welfareEditSlide: {
- ...this.state.welfareEditSlide,
+ ...this.state.welfareEditSlide, visible: true,
socialBase: socialBase.data, fundBase: fundBase.data, othersBase: othersBase.data
}
- },()=>console.log(this.state.welfareEditSlide));
+ });
});
break;
case "ADD-TO-PAY":
From 436db457dbc853df269dd84f0740c1f19a5769fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 9 Nov 2023 17:51:38 +0800
Subject: [PATCH 20/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 34 +++++++++++++++----
.../components/welfareTableList/index.js | 26 +++++++++-----
.../welfareArchive/config.js | 6 ++--
3 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index ffeb9a2d..ac440549 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -29,29 +29,43 @@ class Index extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
document.querySelector(".salary-welfare-archive").classList.add("zIndex0-welfare-archive");
- this.getBaseForm(nextProps);
+ const promise = this.getBaseForm(nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
const { archivesStore: { initWelfareProfileForm, setHasBeenModify } } = nextProps;
document.querySelector(".salary-welfare-archive").classList.remove("zIndex0-welfare-archive");
initWelfareProfileForm();
}
+ console.log(38, nextProps);
}
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
const {
- archivesStore: { welfareProfileForm }, socialBase, fundBase, othersBase,
+ archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase,
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
- console.log(props);
+ const conditions = _.reduce(welfareConditions, (pre, cur) => {
+ if (cur.title === "social") {
+ return [...pre, cur, ...socialBase.items];
+ } else if (cur.title === "fund") {
+ return [...pre, cur, ...fundBase.items];
+ } else if (cur.title === "others") {
+ return [...pre, cur, ...otherBase.items];
+ }
+ return [...pre, cur];
+ }, []);
+ console.log(conditions, props);
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
- const formData = { ...result, ...socialBaseData, ...fundBaseData, ...othersBaseData };
+ const formData = {
+ ...result, ...socialBaseData, ...fundBaseData, ...othersBaseData,
+ ...socialBase.data, ...fundBase.data, ...otherBase.data
+ };
this.setState({
formData,
- conditions: _.map(welfareConditions, o => {
+ conditions: _.map(conditions, o => {
if (o.title === "basic") {
return {
...o, title: getLabel(542699, "员工基本信息"),
@@ -112,10 +126,16 @@ class Index extends Component {
});
};
handleFormChange = (val) => {
- const changeKey = _.keys(val)[0];
- const { archivesStore: { setHasBeenModify } } = this.props;
+ const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
+ const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
console.log(val, changeKey);
setHasBeenModify(true);
+ if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") {
+ onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, {
+ employeeId,
+ paymentOrganization
+ });
+ }
};
renderTitle = () => {
const { loading } = this.state;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 42ccdf73..c09bf6ed 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -85,7 +85,7 @@ class Index extends Component {
const [socialItems, fundItems, othersItems] = await Promise.all([
this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"] }),
this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"] }),
- this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"] })
+ this.getProfileTypeForm({ ...payload, welfareTypeEnum: welfareTypeEnum["other"] })
]);
this.setState({
welfareEditSlide: {
@@ -106,15 +106,15 @@ class Index extends Component {
const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData,
{ ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData,
{ OTHER: { otherSchemeId } } = othersBaseData;
- const [socialBase, fundBase, othersBase] = await Promise.all([
+ const [socialBase, fundBase, otherBase] = await Promise.all([
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"], schemeId: socialSchemeId }),
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"], schemeId: fundSchemeId }),
- this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"], schemeId: otherSchemeId })
+ this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["other"], schemeId: otherSchemeId })
]);
this.setState({
welfareEditSlide: {
...this.state.welfareEditSlide, visible: true,
- socialBase: socialBase.data, fundBase: fundBase.data, othersBase: othersBase.data
+ socialBase: socialBase.data, fundBase: fundBase.data, otherBase: otherBase.data
}
});
});
@@ -146,9 +146,7 @@ class Index extends Component {
return API.getBaseForm(payload);
};
getPaymentForm = async (props) => {
- const { employeeId, paymentOrganization, welfareTypeEnum } = props;
- const payload = { employeeId, paymentOrganization, welfareTypeEnum };
- return API.getPaymentForm(payload);
+ return API.getPaymentForm({ ...props });
};
getWelfareList = (props) => {
const { pageInfo } = this.state;
@@ -235,6 +233,16 @@ class Index extends Component {
const childFrameObj = document.getElementById("atdTable");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
+ handleChangeProgramme = (type, schemeId, payload) => {
+ this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
+ .then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
+ });
+ }
+ });
+ };
render() {
const { loading, dataSource, welfareEditSlide } = this.state;
@@ -257,7 +265,9 @@ class Index extends Component {
this.setState({
welfareEditSlide: { ...welfareEditSlide, visible: false }
- })}/>
+ })}
+ onChangeProgramme={this.handleChangeProgramme}
+ />
);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 7e991801..eb4469e3 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -11,7 +11,7 @@ const getLabel = WeaLocaleProvider.getLabel;
export const welfareTypeEnum = {
social: "SOCIAL_SECURITY",
fund: "ACCUMULATION_FUND",
- others: "OTHER"
+ other: "OTHER"
};
export const optTypeEnum = [
//批量增员
@@ -672,11 +672,11 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
hide: fields.hide
});
});
- group.push(
+ !_.isEmpty(items) && group.push(
: }
- className={c.col === 3 ? "basic-welfare-info-wrapper" : c.col === 2 ? "twoColumns-welfare-info-wrapper" : ""}
+ className={c.col === 3 ? "basic-welfare-info-wrapper" : (c.col === 2 || c.items.length > 1) ? "twoColumns-welfare-info-wrapper" : ""}
/>);
});
return group;
From d46f40b08691cf88854fc9a95a685c31ff64f4b5 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, 10 Nov 2023 13:34:36 +0800
Subject: [PATCH 21/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareEditArchiveSlide/index.js | 5 +++--
.../welfareArchive/components/welfareTableList/index.js | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index ac440549..0ca2fa72 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -31,11 +31,10 @@ class Index extends Component {
document.querySelector(".salary-welfare-archive").classList.add("zIndex0-welfare-archive");
const promise = this.getBaseForm(nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
- const { archivesStore: { initWelfareProfileForm, setHasBeenModify } } = nextProps;
+ const { archivesStore: { initWelfareProfileForm } } = nextProps;
document.querySelector(".salary-welfare-archive").classList.remove("zIndex0-welfare-archive");
initWelfareProfileForm();
}
- console.log(38, nextProps);
}
getBaseForm = async (props) => {
@@ -125,6 +124,8 @@ class Index extends Component {
}
});
};
+ updateForm = () => {
+ };
handleFormChange = (val) => {
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index c09bf6ed..928e3add 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -239,7 +239,7 @@ class Index extends Component {
if (status) {
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
- });
+ }, () => this.archiveSlideRef.updateForm());
}
});
};
@@ -262,7 +262,7 @@ class Index extends Component {
/>
{/* 编辑产看员工福利档案*/}
- this.archiveSlideRef = dom}
onClose={(isFresh) => this.setState({
welfareEditSlide: { ...welfareEditSlide, visible: false }
})}
From c2f4c4372cf16457ade8bd030f01adf5da0af612 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, 24 Nov 2023 11:43:03 +0800
Subject: [PATCH 22/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 16 +------
.../components/welfareTableList/index.js | 2 +-
.../welfareArchive/config.js | 48 +++++++++++++++++--
3 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 0ca2fa72..2507a7c8 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -44,17 +44,6 @@ class Index extends Component {
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
- const conditions = _.reduce(welfareConditions, (pre, cur) => {
- if (cur.title === "social") {
- return [...pre, cur, ...socialBase.items];
- } else if (cur.title === "fund") {
- return [...pre, cur, ...fundBase.items];
- } else if (cur.title === "others") {
- return [...pre, cur, ...otherBase.items];
- }
- return [...pre, cur];
- }, []);
- console.log(conditions, props);
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
@@ -64,7 +53,7 @@ class Index extends Component {
};
this.setState({
formData,
- conditions: _.map(conditions, o => {
+ conditions: _.map(welfareConditions, o => {
if (o.title === "basic") {
return {
...o, title: getLabel(542699, "员工基本信息"),
@@ -129,7 +118,6 @@ class Index extends Component {
handleFormChange = (val) => {
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
- console.log(val, changeKey);
setHasBeenModify(true);
if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") {
onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, {
@@ -174,7 +162,7 @@ class Index extends Component {
top={0} width={800} height={100} measureT={"%"} measureX={"px"} measureY={"%"}
direction={"right"} title={this.renderTitle()} onClose={this.handleClose}
content={
- {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData)}
+ {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData, this.props)}
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 928e3add..963e0e01 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -239,7 +239,7 @@ class Index extends Component {
if (status) {
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
- }, () => this.archiveSlideRef.updateForm());
+ });
}
});
};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index eb4469e3..a5cb8917 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -1,5 +1,13 @@
import React from "react";
-import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
+import {
+ WeaCheckbox,
+ WeaFormItem,
+ WeaHelpfulTip,
+ WeaInputNumber,
+ WeaLocaleProvider,
+ WeaSearchGroup,
+ WeaTools
+} from "ecCom";
import { WeaSwitch } from "comsMobx";
import { Button } from "antd";
import AdvanceInputBtn from "./components/advanceInputBtn";
@@ -648,11 +656,12 @@ export const welfareConditions = [
]
}
];
-export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload, extraFormField) => {
const CustomComponent = ({ type }) => {
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
return ;
};
+ const { socialBase, fundBase, otherBase } = extraFormField;
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -679,5 +688,38 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
className={c.col === 3 ? "basic-welfare-info-wrapper" : (c.col === 2 || c.items.length > 1) ? "twoColumns-welfare-info-wrapper" : ""}
/>);
});
- return group;
+ return _.reduce(group, (pre, cur) => {
+ if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ } else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ } else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ }
+ return [...pre, cur];
+ }, []);
+};
+
+const BenefitBaseComponent = (props) => {
+ const { dataSource, value } = props;
+ return
+ {
+ _.map(dataSource, item => {
+ const { title, items } = item;
+ return ({
+ com:
+ 0 ? minNum : -999999999999999}
+ // max={maxNum > 0 ? maxNum : 999999999999999}
+ />
+
+ }))}
+ customComponent={123
}
+ title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
+ />;
+ })
+ }
+ ;
};
From 7579a8cd31af803457eb16033b72fde27951b389 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, 24 Nov 2023 14:45:37 +0800
Subject: [PATCH 23/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 3 ++-
.../welfareArchive/config.js | 20 +++++++++++--------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 2507a7c8..ad549ea8 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -126,6 +126,7 @@ class Index extends Component {
});
}
};
+ handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
renderTitle = () => {
const { loading } = this.state;
return
@@ -162,7 +163,7 @@ class Index extends Component {
top={0} width={800} height={100} measureT={"%"} measureX={"px"} measureY={"%"}
direction={"right"} title={this.renderTitle()} onClose={this.handleClose}
content={
- {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData, this.props)}
+ {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, this.handleExtraChange, formData, this.props)}
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index a5cb8917..91714b3e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -656,7 +656,7 @@ export const welfareConditions = [
]
}
];
-export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload, extraFormField) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), onExtraChange = () => void (0), payload, extraFormField) => {
const CustomComponent = ({ type }) => {
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
return
;
@@ -690,18 +690,21 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
});
return _.reduce(group, (pre, cur) => {
if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
- return [...pre, cur,
];
+ return [...pre, cur,
+ ];
} else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
- return [...pre, cur, ];
+ return [...pre, cur,
+ ];
} else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
- return [...pre, cur, ];
+ return [...pre, cur,
+ ];
}
return [...pre, cur];
}, []);
};
const BenefitBaseComponent = (props) => {
- const { dataSource, value } = props;
+ const { dataSource, value, onChange } = props;
return
{
_.map(dataSource, item => {
@@ -710,9 +713,10 @@ const BenefitBaseComponent = (props) => {
items={_.map(items, child => ({
com:
0 ? minNum : -999999999999999}
- // max={maxNum > 0 ? maxNum : 999999999999999}
+ value={value[getKey(child)] || (child.min !== "0.000" ? child.min : 0)} precision={2}
+ min={child.min !== "0.000" ? child.min : -999999999999999}
+ max={child.max !== "0.000" ? child.max : 999999999999999}
+ onChange={v => onChange(getKey(child), v)}
/>
}))}
From 2c7633b0c9d584fd3fb9049402803a285bac7fbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 27 Nov 2023 15:29:07 +0800
Subject: [PATCH 24/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 35 +++++++++++++++++--
.../components/welfareTableList/index.js | 3 ++
.../welfareArchive/config.js | 12 +++++--
.../welfareArchive/index.less | 6 ++++
pc4mobx/hrmSalary/util/index.js | 9 +++++
5 files changed, 60 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index ad549ea8..2a979f60 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -113,8 +113,31 @@ class Index extends Component {
}
});
};
- updateForm = () => {
+ covertPayload = (welfareType, paymentForm) => {
+ const { archivesStore: { welfareProfileForm } } = this.props;
+ const welfareData = welfareProfileForm.getFormParams();
+ const { formData } = this.state;
+ console.log(welfareData, formData, this.props, paymentForm);
+ return {
+ baseForm: {
+ ...formData[welfareType], ..._.reduce(_.keys(formData[welfareType]), (pre, cur) => {
+ if (welfareData[cur]) return { ...pre, [cur]: welfareData[cur] };
+ return { ...pre };
+ }, {}),
+ underTake: welfareData[`${_.lowerCase(welfareType.split("_")[0])}UnderTake`]
+ },
+ paymentForm: !_.isEmpty(paymentForm) ? _.reduce(paymentForm, (pre, cur) => {
+ if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: formData[cur] };
+ return { ...pre, [cur]: "0" };
+ }, {}) : "",
+ welfareType
+ };
};
+ save = () => {
+ console.log(this.covertPayload("SOCIAL_SECURITY", getConditionDomkeys(this.props.socialBase.items)));
+ };
+ updateFormData=()=>{
+ }
handleFormChange = (val) => {
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
@@ -127,6 +150,9 @@ class Index extends Component {
}
};
handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
+ handleNoPaymentChange = (type, value) => this.setState({
+ formData: { ...this.state.formData, [type]: { ...this.state.formData[type], nonPayment: value } }
+ });
renderTitle = () => {
const { loading } = this.state;
return
@@ -163,7 +189,12 @@ class Index extends Component {
top={0} width={800} height={100} measureT={"%"} measureX={"px"} measureY={"%"}
direction={"right"} title={this.renderTitle()} onClose={this.handleClose}
content={
- {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, this.handleExtraChange, formData, this.props)}
+ {
+ getWelfareSearchsForm(
+ welfareProfileForm, conditions, this.handleFormChange, this.handleNoPaymentChange, this.handleExtraChange,
+ formData, this.props
+ )
+ }
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 963e0e01..14e92020 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -11,6 +11,7 @@ import { message, Modal, Spin } from "antd";
import WelfareEditArchiveSlide from "../welfareEditArchiveSlide";
import * as API from "../../../../../apis/welfareArchive";
import { welfareTypeEnum } from "../../config";
+import { getConditionDomkeys, getConditionFields } from "../../../../../util";
const getLabel = WeaLocaleProvider.getLabel;
const APILIST = {
@@ -239,6 +240,8 @@ class Index extends Component {
if (status) {
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
+ }, () => {
+ console.log(this.archiveSlideRef);
});
}
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 91714b3e..b21207de 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -656,10 +656,13 @@ export const welfareConditions = [
]
}
];
-export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), onExtraChange = () => void (0), payload, extraFormField) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), onNoPaymentChange = () => void (0), onExtraChange = () => void (0), payload, extraFormField) => {
const CustomComponent = ({ type }) => {
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
- return
;
+ return
onNoPaymentChange(type, v)}
+ />;
};
const { socialBase, fundBase, otherBase } = extraFormField;
const { isFormInit } = form;
@@ -720,7 +723,10 @@ const BenefitBaseComponent = (props) => {
/>
}))}
- customComponent={123
}
+ customComponent={
+ {getLabel(543195, "各项福利基数一致")}
+
+
}
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
/>;
})
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
index 4b57066d..65aaa543 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -205,6 +205,12 @@
background: #FFF;
border: 1px solid #e5e5e5;
}
+
+ .welfare-same-box {
+ & > span {
+ margin-right: 10px;
+ }
+ }
}
}
}
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index 9be126dc..d7c0f815 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -15,6 +15,15 @@ export const getConditionDomkeys = (condition) => {
});
return domkeyList;
};
+// 获取condition的field集合
+export const getConditionFields = (condition) => {
+ return _.reduce(condition, (pre, cur) => {
+ return {
+ ...pre,
+ ..._.reduce(cur.items, (pre1, cur1) => ({ ...pre1, [cur1["domkey"][0]]: cur1 }), {})
+ };
+ }, {});
+};
// 渲染form表单: 一般对form的渲染都统一使用该方法
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
From 5e6077502994bb0c5929804cf49f062b15bb2782 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 27 Nov 2023 17:45:11 +0800
Subject: [PATCH 25/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 74 ++++++++++++++-----
.../components/welfareTableList/index.js | 11 ++-
.../welfareArchive/config.js | 15 ++--
3 files changed, 76 insertions(+), 24 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 2a979f60..c07f57f5 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -10,8 +10,8 @@ import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import * as API from "../../../../../apis/welfareArchive";
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
import { getWelfareSearchsForm, welfareConditions } from "../../config";
-import { getConditionDomkeys } from "../../../../../util";
-import { Button, Modal } from "antd";
+import { getConditionDomkeys, toDecimal_n } from "../../../../../util";
+import { Button, message, Modal } from "antd";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -94,7 +94,6 @@ class Index extends Component {
};
})
}, () => {
- console.log(this.state.conditions, props, formData);
welfareProfileForm.initFormFields(this.state.conditions);
_.map(getConditionDomkeys(this.state.conditions), k => {
if (k === "paymentOrganization") {
@@ -113,31 +112,49 @@ class Index extends Component {
}
});
};
- covertPayload = (welfareType, paymentForm) => {
+ covertPayload = (welfareType, underTakeType, paymentForm) => {
const { archivesStore: { welfareProfileForm } } = this.props;
const welfareData = welfareProfileForm.getFormParams();
const { formData } = this.state;
- console.log(welfareData, formData, this.props, paymentForm);
return {
- baseForm: {
+ baseForm: JSON.stringify({
...formData[welfareType], ..._.reduce(_.keys(formData[welfareType]), (pre, cur) => {
if (welfareData[cur]) return { ...pre, [cur]: welfareData[cur] };
return { ...pre };
}, {}),
- underTake: welfareData[`${_.lowerCase(welfareType.split("_")[0])}UnderTake`]
- },
- paymentForm: !_.isEmpty(paymentForm) ? _.reduce(paymentForm, (pre, cur) => {
- if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: formData[cur] };
+ underTake: welfareData[`${underTakeType}UnderTake`]
+ }),
+ paymentForm: !_.isEmpty(paymentForm) ? JSON.stringify(_.reduce(paymentForm, (pre, cur) => {
+ if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: formData[cur].toString() };
return { ...pre, [cur]: "0" };
- }, {}) : "",
+ }, {})) : "",
welfareType
};
};
- save = () => {
- console.log(this.covertPayload("SOCIAL_SECURITY", getConditionDomkeys(this.props.socialBase.items)));
+ save = async () => {
+ this.setState({ loading: true });
+ const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items)),
+ fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items)),
+ otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items));
+ const [{
+ status: socialStatus,
+ errormsg: socialErrorMsg = "!"
+ }, {
+ status: fundStatus,
+ errormsg: fundErrorMsg = "!"
+ }, {
+ status: otherStatus,
+ errormsg: otherErrorMsg = "!"
+ }] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
+ this.setState({ loading: false });
+ if (socialStatus && fundStatus && otherStatus) {
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onClose();
+ } else {
+ message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
+ }
};
- updateFormData=()=>{
- }
+ updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
handleFormChange = (val) => {
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
@@ -149,7 +166,30 @@ class Index extends Component {
});
}
};
- handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
+ handleExtraChange = (key, value) => this.setState({
+ formData: {
+ ...this.state.formData, [key]: toDecimal_n(value, 2)
+ }
+ });
+ handleSameChange = (baseItems, value) => {
+ let newFormDatas = {}, hasCompromise = false;
+ baseItems.forEach((formLabel) => {
+ const { min, max } = formLabel;
+ newFormDatas[getKey(formLabel)] = toDecimal_n(value, 2) || "";
+ if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
+ hasCompromise = true;
+ newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
+ }
+ if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
+ hasCompromise = true;
+ newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
+ }
+ });
+ if (hasCompromise) {
+ message.warning(getLabel("111", "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"));
+ }
+ this.setState({ formData: { ...this.state.formData, ...newFormDatas } });
+ };
handleNoPaymentChange = (type, value) => this.setState({
formData: { ...this.state.formData, [type]: { ...this.state.formData[type], nonPayment: value } }
});
@@ -192,7 +232,7 @@ class Index extends Component {
{
getWelfareSearchsForm(
welfareProfileForm, conditions, this.handleFormChange, this.handleNoPaymentChange, this.handleExtraChange,
- formData, this.props
+ this.handleSameChange, formData, this.props
)
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 14e92020..9d980e12 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -238,10 +238,19 @@ class Index extends Component {
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
.then(({ status, data }) => {
if (status) {
+ const { data: defVal, items } = data;
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
}, () => {
- console.log(this.archiveSlideRef);
+ this.archiveSlideRef.wrappedInstance.updateFormData(_.reduce(getConditionDomkeys(items), (pre, cur) => {
+ const minNum = !_.isNil(getConditionFields(items)[cur].min) ? Number(getConditionFields(items)[cur].min) : undefined,
+ maxNum = !_.isNil(getConditionFields(items)[cur].max) ? Number(getConditionFields(items)[cur].max) : undefined;
+ const val = !_.isNil(defVal) ? Number(defVal[cur]) : 0;
+ return {
+ ...pre,
+ [cur]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ }, {}));
});
}
});
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index b21207de..79ef18ed 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -656,7 +656,7 @@ export const welfareConditions = [
]
}
];
-export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), onNoPaymentChange = () => void (0), onExtraChange = () => void (0), payload, extraFormField) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), onNoPaymentChange = () => void (0), onExtraChange = () => void (0), onSameChange = () => void (0), payload, extraFormField) => {
const CustomComponent = ({ type }) => {
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
return void (0)
return _.reduce(group, (pre, cur) => {
if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
return [...pre, cur,
- ];
+ ];
} else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
return [...pre, cur,
- ];
+ ];
} else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
return [...pre, cur,
- ];
+ ];
}
return [...pre, cur];
}, []);
};
const BenefitBaseComponent = (props) => {
- const { dataSource, value, onChange } = props;
+ const { dataSource, value, onChange, onSameChange } = props;
return
{
_.map(dataSource, item => {
@@ -725,7 +728,7 @@ const BenefitBaseComponent = (props) => {
}))}
customComponent={
{getLabel(543195, "各项福利基数一致")}
-
+ onSameChange(items, v)}/>
}
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
/>;
From e01b5bf1c9b3f1a34101af10c622a920cc22109a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 27 Nov 2023 17:52:17 +0800
Subject: [PATCH 26/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareArchive/components/welfareEditArchiveSlide/index.js | 2 +-
.../welfareArchive/components/welfareTableList/index.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index c07f57f5..bcfa19cd 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -149,7 +149,7 @@ class Index extends Component {
this.setState({ loading: false });
if (socialStatus && fundStatus && otherStatus) {
message.success(getLabel(30700, "操作成功!"));
- this.props.onClose();
+ this.props.onClose(true);
} else {
message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 9d980e12..86a5e3bc 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -277,7 +277,7 @@ class Index extends Component {
this.archiveSlideRef = dom}
onClose={(isFresh) => this.setState({
welfareEditSlide: { ...welfareEditSlide, visible: false }
- })}
+ }, () => isFresh && this.getWelfareList(this.props))}
onChangeProgramme={this.handleChangeProgramme}
/>
From f113cb437f2f9c5a2ea0527496677ea2d380bc15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 30 Nov 2023 14:52:14 +0800
Subject: [PATCH 27/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareEditArchiveSlide/index.js | 6 +++++-
.../components/welfareTableList/index.js | 10 ++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index bcfa19cd..8a1c7579 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -195,13 +195,17 @@ class Index extends Component {
});
renderTitle = () => {
const { loading } = this.state;
+ const { runStatuses } = this.props;
return
{getLabel(543191, "员工福利档案")}
-
+ {
+ runStatuses !== "4,5" &&
+
+ }
;
};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 86a5e3bc..7abea7c9 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -59,7 +59,8 @@ class Index extends Component {
}
if ((nextProps.runStatuses !== this.props.runStatuses)) {
this.setState({
- dataSource: [], columns: [], loading: false, selectedRowKeys: []
+ dataSource: [], columns: [], loading: false, selectedRowKeys: [],
+ welfareEditSlide: { ...this.state.welfareEditSlide, visible: false }
});
}
}
@@ -70,6 +71,7 @@ class Index extends Component {
this.getWelfareList(this.props);
} else if (type === "turn") {
const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
+ const { runStatuses } = this.props;
switch (id) {
case "PAGEINFO":
this.setState({
@@ -90,7 +92,7 @@ class Index extends Component {
]);
this.setState({
welfareEditSlide: {
- ...this.state.welfareEditSlide, employeeId, paymentOrganization,
+ ...this.state.welfareEditSlide, employeeId, paymentOrganization, runStatuses,
socialItems: socialItems.data.items[0].items,
socialBaseData: {
SOCIAL_SECURITY: { ...socialItems.data.data, socialUnderTake: socialItems.data.data.underTake }
@@ -268,8 +270,8 @@ class Index extends Component {
From b14c2f9f87614c494a2b9bf9677beae2f2d4761e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 30 Nov 2023 15:13:09 +0800
Subject: [PATCH 28/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareEditArchiveSlide/index.js | 14 +++++++++++---
.../welfareArchive/config.js | 15 +++++++++------
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 8a1c7579..2f9cde90 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -40,7 +40,7 @@ class Index extends Component {
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
const {
- archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase,
+ archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase, runStatuses,
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
@@ -57,6 +57,7 @@ class Index extends Component {
if (o.title === "basic") {
return {
...o, title: getLabel(542699, "员工基本信息"),
+ viewAttr: runStatuses === "4,5" ? 1 : o.viewAttr,
items: _.map(o.items, g => {
return { ...g, label: getLabel(g.lanId, g.label) };
})
@@ -80,16 +81,23 @@ class Index extends Component {
const key = _.lowerCase(getKey(g)).indexOf("take") !== -1 ? "underTake" : getKey(g);
return {
...g, label: getLabel(g.lanId, g.label),
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr,
options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options
};
}
- return { ...g, label: getLabel(g.lanId, g.label) };
+ return {
+ ...g, label: getLabel(g.lanId, g.label),
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr,
+ };
})
};
}
return {
...o, items: _.map(o.items, g => {
- return { ...g, label: getLabel(g.lanId, g.label) };
+ return {
+ ...g, label: getLabel(g.lanId, g.label),
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr,
+ };
})
};
})
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 79ef18ed..b87b8299 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -662,9 +662,10 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
return onNoPaymentChange(type, v)}
+ disabled={runStatuses === "4,5"}
/>;
};
- const { socialBase, fundBase, otherBase } = extraFormField;
+ const { socialBase, fundBase, otherBase, runStatuses } = extraFormField;
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -695,22 +696,22 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
return [...pre, cur,
];
+ onSameChange={onSameChange} runStatuses={runStatuses}/>];
} else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
return [...pre, cur,
];
+ onSameChange={onSameChange} runStatuses={runStatuses}/>];
} else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
return [...pre, cur,
];
+ onSameChange={onSameChange} runStatuses={runStatuses}/>];
}
return [...pre, cur];
}, []);
};
const BenefitBaseComponent = (props) => {
- const { dataSource, value, onChange, onSameChange } = props;
+ const { dataSource, value, onChange, onSameChange, runStatuses } = props;
return
{
_.map(dataSource, item => {
@@ -723,12 +724,14 @@ const BenefitBaseComponent = (props) => {
min={child.min !== "0.000" ? child.min : -999999999999999}
max={child.max !== "0.000" ? child.max : 999999999999999}
onChange={v => onChange(getKey(child), v)}
+ viewAttr={runStatuses === "4,5" ? 1 : 2}
/>
}))}
customComponent={
{getLabel(543195, "各项福利基数一致")}
- onSameChange(items, v)}/>
+ onSameChange(items, v)}
+ disabled={runStatuses === "4,5"}/>
}
title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
/>;
From 44483933738483d77628cdc7081a5be7a8b9fc4c 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, 1 Dec 2023 11:21:01 +0800
Subject: [PATCH 29/29] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/welfareEditArchiveSlide/index.js | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 2f9cde90..82fa8fc0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -87,7 +87,7 @@ class Index extends Component {
}
return {
...g, label: getLabel(g.lanId, g.label),
- viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr,
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr
};
})
};
@@ -96,7 +96,7 @@ class Index extends Component {
...o, items: _.map(o.items, g => {
return {
...g, label: getLabel(g.lanId, g.label),
- viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr,
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr
};
})
};
@@ -133,7 +133,7 @@ class Index extends Component {
underTake: welfareData[`${underTakeType}UnderTake`]
}),
paymentForm: !_.isEmpty(paymentForm) ? JSON.stringify(_.reduce(paymentForm, (pre, cur) => {
- if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: formData[cur].toString() };
+ if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: toDecimal_n(formData[cur], 2).toString() };
return { ...pre, [cur]: "0" };
}, {})) : "",
welfareType
@@ -174,11 +174,7 @@ class Index extends Component {
});
}
};
- handleExtraChange = (key, value) => this.setState({
- formData: {
- ...this.state.formData, [key]: toDecimal_n(value, 2)
- }
- });
+ handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
handleSameChange = (baseItems, value) => {
let newFormDatas = {}, hasCompromise = false;
baseItems.forEach((formLabel) => {