- {getSearchs(form, condition)}
+
+ {getSearchs(form, condition, 2, false)}
若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据
);
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
index 742d1573..8945d37b 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
@@ -404,7 +404,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
- labelcol: 4,
+ labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@@ -414,7 +414,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
- labelcol: 4,
+ labelcol: 8,
lanId: 537996,
value: "",
options: [],
@@ -448,7 +448,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 9f1e481f..2d7d12f6 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -244,10 +244,12 @@ class Index extends Component {
};
this.handleSaveDeduction(payload);
} else {
- Modal.warning({
- title: "信息确认",
- content: "必要信息不完整,红色*为必填项!"
- });
+ f.showErrors();
+ this.forceUpdate();
+ // Modal.warning({
+ // title: "信息确认",
+ // content: "必要信息不完整,红色*为必填项!"
+ // });
}
});
};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
index e677d531..58acfc56 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
@@ -5,9 +5,9 @@
* Date: 2023/2/17
*/
import React, { Component } from "react";
-import UnifiedTable from "../../components/UnifiedTable";
+// import UnifiedTable from "../../components/UnifiedTable";
import { getTableDate } from "../../apis/cumDeduct";
-import { Menu, Popover } from "antd";
+import { Menu, Popover, Spin } from "antd";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
@@ -16,24 +16,44 @@ class DataTables extends Component {
constructor(props) {
super(props);
this.state = {
- loading: {
- query: false
- },
- dataSource: [],
- columns: [],
- selectedRowKeys: [],
- pageInfo: {
- current: 1, pageSize: 10, total: 0
- }
+ loading: { query: false }, dataSource: [], columns: [], selectedRowKeys: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
- this.getTableDate();
+ window.addEventListener("message", this.handleReceive, false);
}
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ this.getTableDate();
+ } else if (type === "turn") {
+ switch (id) {
+ case "PAGEINFO":
+ this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getTableDate());
+ break;
+ case "CHECKBOX":
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ break;
+ case "DEL":
+ break;
+ case "EDIT":
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
getTableDate = (extraPayload = {}) => {
- const { loading, pageInfo } = this.state;
+ const { loading, pageInfo, selectedRowKeys } = this.state;
const { url, payload } = this.props;
const module = {
...pageInfo, url, ...payload, ...extraPayload,
@@ -45,10 +65,12 @@ class DataTables extends Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource,
- columns
- });
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
+ }, () => this.postMessageToChild({
+ dataSource: this.state.dataSource, scrollHeight: 95, selectedRowKeys,
+ pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
+ columns: this.state.columns
+ }));
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
};
@@ -59,6 +81,14 @@ class DataTables extends Component {
* Date: 2023/2/20
*/
handleClearRows = () => this.setState({ selectedRowKeys: [] });
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
+ "条": getLabel(18256, "条"), "删除": getLabel(111, "删除")
+ };
+ const childFrameObj = document.getElementById("unitTable");
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ };
render() {
const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
@@ -168,15 +198,27 @@ class DataTables extends Component {
};
}
});
- return
;
+ let height = 280;
+ if (dataSource.length > 0) height = dataSource.length <= 10 ? dataSource.length * 46 + 108 : 500;
+ return (
+
+
+
+
);
+ //
;
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
index f5272aed..68f26be8 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
@@ -57,6 +57,15 @@
height: 100%;
display: flex;
flex-direction: column;
+ background: #F6F6F6;
+
+ .wea-new-top-wapper, .wea-tab {
+ background: #FFF;
+ }
+
+ .wea-tab {
+ margin: 8px 16px;
+ }
.wea-tab-left {
min-width: 600px !important;
@@ -112,8 +121,12 @@
}
.dataContent {
- flex: 1;
overflow: hidden;
+ padding: 0 16px;
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100% !important;
+ }
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
index 9337f5f9..513660aa 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
@@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
-import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
+import { WeaLocaleProvider, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
import ImportModal from "./importDialog";
import LogDialog from "../../components/logViewModal";
import SlideModalTitle from "../../components/slideModalTitle";
@@ -99,6 +99,7 @@ class Layout extends Component {
]}
/>
-
{children}
+ {children}
{/*导入弹框*/}
Date: Wed, 30 Oct 2024 10:59:46 +0800
Subject: [PATCH 08/17] =?UTF-8?q?feature/2.16.1.2410.01-=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E9=87=87=E9=9B=86=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/dataAcquisition/cumDeduct/index.js | 10 +++----
.../pages/dataAcquisition/dataTables.js | 2 +-
.../pages/dataAcquisition/index.less | 26 ++++---------------
3 files changed, 10 insertions(+), 28 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 2d7d12f6..9f1e481f 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -244,12 +244,10 @@ class Index extends Component {
};
this.handleSaveDeduction(payload);
} else {
- f.showErrors();
- this.forceUpdate();
- // Modal.warning({
- // title: "信息确认",
- // content: "必要信息不完整,红色*为必填项!"
- // });
+ Modal.warning({
+ title: "信息确认",
+ content: "必要信息不完整,红色*为必填项!"
+ });
}
});
};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
index 58acfc56..e1ac75f4 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
@@ -199,7 +199,7 @@ class DataTables extends Component {
}
});
let height = 280;
- if (dataSource.length > 0) height = dataSource.length <= 10 ? dataSource.length * 46 + 108 : 500;
+ if (dataSource.length > 0) height = dataSource.length <= 10 ? dataSource.length * 46 + 124 : 500;
return (