diff --git a/pc4mobx/hrmSalary/util/options.js b/pc4mobx/hrmSalary/util/options.js
index 13ef81e4..6d2fe74a 100644
--- a/pc4mobx/hrmSalary/util/options.js
+++ b/pc4mobx/hrmSalary/util/options.js
@@ -1,19 +1,19 @@
// 添加全部选项
export const optionAddAll = (options) => {
- let results = [...options];
- results.unshift({
- key: "All",
- showname: "全部",
- selected: false
- })
- return results;
-}
+ let results = [...options];
+ results.unshift({
+ key: "All",
+ showname: "全部",
+ selected: false
+ });
+ return results;
+};
export const optionAddWhole = (options) => {
- let results = [...options];
- results.unshift({
- key: "",
- showname: "全部",
- selected: false
- })
- return results;
-}
+ let results = [...options];
+ results.unshift({
+ key: "",
+ showname: "全部个税扣缴义务人",
+ selected: false
+ });
+ return results;
+};
From 28a7bb7f646862babce45b9838bbb7ddefb8ecf5 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, 25 May 2023 14:39:01 +0800
Subject: [PATCH 03/10] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E5=88=86=E6=9E=90-=E5=91=98=E5=B7=A5=E6=98=8E=E7=BB=86?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/employeeDetails.js | 21 ++++----
pc4mobx/hrmSalary/pages/employeeView/index.js | 48 ++++++++++++-------
2 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
index 6d9d0274..1360fb57 100644
--- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
+++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
@@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
-import { Menu, Popover } from "antd";
+import { Dropdown, Menu } from "antd";
import { statisticsEmployeeList } from "../../../apis/statistics";
import "../index.less";
@@ -56,19 +56,14 @@ class EmployeeDetails extends Component {
width: 80,
render: (_, record) => {
return
-
{
- window.open(`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`);
- }}>
- {getLabel(111, "查看")}
-
- }
- >
+
+ {getLabel(111, "查看")}
+
+ } overlayStyle={{ width: "auto", height: "auto" }}>
-
+
;
}
}]
diff --git a/pc4mobx/hrmSalary/pages/employeeView/index.js b/pc4mobx/hrmSalary/pages/employeeView/index.js
index 86a3353f..1d220a8c 100644
--- a/pc4mobx/hrmSalary/pages/employeeView/index.js
+++ b/pc4mobx/hrmSalary/pages/employeeView/index.js
@@ -26,7 +26,12 @@ class Index extends Component {
taxAgentId: "",
salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
dataSource: [],
- columns: []
+ columns: [],
+ pageInfo: {
+ current: 1,
+ pageSize: 10,
+ total: 0
+ }
};
}
@@ -41,45 +46,56 @@ class Index extends Component {
}
handleReceive = ({ data }) => {
- const { type } = data;
+ const { type, payload: { id, params } = {} } = data;
+ const { columns, dataSource, pageInfo } = this.state;
if (type === "init") {
- const { columns, dataSource } = this.state;
this.postMessageToChild({
columns, dataSource,
- showSum: false
+ showSum: false, pageInfo
});
} else if (type === "turn") {
+ if (id === "PAGEINFO") {
+ const { pageNum: current, size: pageSize } = params;
+ this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.statisticsEmployeeDetailList());
+ }
}
};
postMessageToChild = (payload) => {
const childFrameObj = document.getElementById("atdTable");
- const { dataSource, columns, showSum } = payload;
+ const { dataSource, columns, showSum, pageInfo } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum
+ dataSource, columns, showSum, pageInfo
}), "*");
};
statisticsEmployeeDetailList = () => {
const { params: { employeeId } } = this.props;
- const { taxAgentId, salaryMonth } = this.state;
- const payload = { employeeId, taxAgentId, salaryMonth };
+ const { taxAgentId, salaryMonth, pageInfo } = this.state;
+ const payload = {
+ employeeId, taxAgentId,
+ salaryMonth: salaryMonth.map(item => moment(item).format("YYYY-MM-DD")),
+ ...pageInfo
+ };
this.setState({ loading: true });
statisticsEmployeeDetailList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
- const { columns, pageInfo: { list } } = data;
+ const { columns, pageInfo: { list, pageNum: current, pageSize, total } } = data;
this.setState({
- columns: _.map(columns, it => ({
+ columns: _.map(columns, (it, idx) => ({
...it,
- dataIndex: it.column, width: 150,
- title: it.text, align: "left"
+ dataIndex: it.text, width: 150,
+ title: it.width, align: "left",
+ fixed: (idx === 1 || idx === 0) ? "left" : "",
+ ellipsis: true
})),
- dataSource: list || []
+ dataSource: list || [],
+ pageInfo: { ...pageInfo, current, pageSize, total }
}, () => {
this.postMessageToChild({
columns: this.state.columns,
dataSource: this.state.dataSource,
- showSum: false
+ showSum: false, pageInfo: this.state.pageInfo
});
});
}
@@ -106,8 +122,8 @@ class Index extends Component {
From b9d2a06d99dd88ee3bf024d0c4ea3d3ad3173bef 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, 25 May 2023 16:25:33 +0800
Subject: [PATCH 04/10] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payrollFiles/index.js | 83 ++++++++++++++-----
.../hrmSalary/pages/payrollFiles/index.less | 4 +
2 files changed, 67 insertions(+), 20 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index 5655e499..f3010961 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -14,7 +14,6 @@ import {
WeaFormItem,
WeaHelpfulTip,
WeaInput,
- WeaNewScroll,
WeaPopoverHrm,
WeaSearchGroup,
WeaSelect,
@@ -23,7 +22,7 @@ import {
WeaTop
} from "ecCom";
import { WeaTableNew } from "comsMobx";
-import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
+import { Button, Dropdown, Menu, message, Modal, Popover, Spin } from "antd";
import ImportMenu from "./components/importMenu";
import ExportMenu from "./components/exportMenu";
import AllWithoutPay from "./components/allWithoutPay";
@@ -32,7 +31,6 @@ import SlideModalTitle from "../../components/slideModalTitle";
import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
import "./index.less";
-import UnifiedTable from "../../components/UnifiedTable";
const WeaTableComx = WeaTableNew.WeaTable;
@@ -152,8 +150,45 @@ class Index extends Component {
this.queryTabTotal();
this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList");
const init = this.init();
+ window.addEventListener("message", this.handleReceive, false);
}
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = ({ data }) => {
+ const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
+ const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
+ dataIndex: it.dataIndex,
+ width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150,
+ title: it.title, align: "left",
+ fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
+ ellipsis: true
+ }));
+ const { type, payload: { id, params } = {} } = data;
+ const { dataSource, pageInfo } = this.state;
+ if (type === "init") {
+ this.postMessageToChild({
+ columns, dataSource, showOperateBtn,
+ showSum: false, pageInfo, pointerXY: window.pointerXY
+ });
+ } else if (type === "turn") {
+ if (id === "PAGEINFO") {
+ const { pageNum: current, size: pageSize } = params;
+ console.log(current, pageSize);
+ } else if (id === "USERCARD") {
+ }
+ }
+ };
+ postMessageToChild = (payload) => {
+ const childFrameObj = document.getElementById("atdTable");
+ const { dataSource, columns, showSum, pageInfo } = payload;
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
+ dataSource, columns, showSum, pageInfo
+ }), "*");
+ };
+
init = async () => {
const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" });
const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" });
@@ -791,24 +826,32 @@ class Index extends Component {
searchsBaseValue={this.state.searchItemsValue.username}
/>
-
-
+
- {/*人员卡片*/}
-
-
-
+
+ {/**/}
+ {/* */}
+ {/**/}
+ {/*人员卡片*/}
+
+
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.less b/pc4mobx/hrmSalary/pages/payrollFiles/index.less
index 160a30ec..72e677e7 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.less
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.less
@@ -7,6 +7,10 @@
.tableWrapper {
flex: 1;
overflow: hidden;
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
+ }
}
}
From 009b81b7074cd2655dff9dfb50ba29bd6c233aaa 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, 26 May 2023 10:44:05 +0800
Subject: [PATCH 05/10] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8=E6=94=B9=E9=80=A0=E5=AE=8C?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payrollFiles/index.js | 132 ++++++------------
.../hrmSalary/pages/payrollFiles/index.less | 1 +
2 files changed, 40 insertions(+), 93 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index f3010961..d20192a3 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -22,7 +22,7 @@ import {
WeaTop
} from "ecCom";
import { WeaTableNew } from "comsMobx";
-import { Button, Dropdown, Menu, message, Modal, Popover, Spin } from "antd";
+import { Button, Dropdown, Menu, message, Modal, Spin } from "antd";
import ImportMenu from "./components/importMenu";
import ExportMenu from "./components/exportMenu";
import AllWithoutPay from "./components/allWithoutPay";
@@ -167,25 +167,36 @@ class Index extends Component {
ellipsis: true
}));
const { type, payload: { id, params } = {} } = data;
- const { dataSource, pageInfo } = this.state;
+ const { dataSource, pageInfo, selectedKey, selectedRowKeys } = this.state;
if (type === "init") {
this.postMessageToChild({
- columns, dataSource, showOperateBtn,
- showSum: false, pageInfo, pointerXY: window.pointerXY
+ columns, dataSource, showOperateBtn, selectedKey,
+ showSum: false, pageInfo, selectedRowKeys
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params;
- console.log(current, pageSize);
- } else if (id === "USERCARD") {
+ this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.query());
+ } else if (id === "EDIT") {
+ const { record } = params;
+ this.handleEdit(record);
+ } else if (id === "MOREOPT") {
+ const { id, event: e } = params;
+ this.handleMenuClick(e, id);
+ } else if (id === "CANCELSTOP") {
+ const { id } = params;
+ this.cancelStop(id);
+ } else if (id === "ROWSELECTION") {
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
}
}
};
postMessageToChild = (payload) => {
const childFrameObj = document.getElementById("atdTable");
- const { dataSource, columns, showSum, pageInfo } = payload;
+ const { dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, pageInfo
+ dataSource, columns, showSum, pageInfo, showOperateBtn, selectedKey, selectedRowKeys
}), "*");
};
@@ -227,7 +238,7 @@ class Index extends Component {
};
queryList = (url) => {
const { loading, pageInfo, searchItemsValue } = this.state;
- const { payrollFilesStore: { tableStore, queryList } } = this.props;
+ const { payrollFilesStore: { tableStore, queryList }, taxAgentStore: { showOperateBtn } } = this.props;
const payload = { ...pageInfo };
this.setState({
loading: { ...loading, query: true }
@@ -481,85 +492,18 @@ class Index extends Component {
return [];
};
getColumns = () => {
- const { selectedKey } = this.state;
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
- let columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true");
- return _.map([
- ...columns], item => {
- if (item.dataIndex === "username") {
- return {
- ...item,
- render: (text, record) => {
- return
window.pointerXY(e)}
- className="ellipsis"
- title={text}
- >
- {text}
- ;
- }
- };
- } else if (item.dataIndex === "operate") {
- return {
- ...item,
- render: (text, record) => {
- if (!showOperateBtn) {
- return
;
- } else {
- if (selectedKey === "pending") {
- return
;
- } else if (selectedKey === "fixed") {
- return
this.handleEdit(record)}>调薪;
- } else if (selectedKey === "suspend") {
- return
;
- } else {
- return
;
- }
- }
- }
- };
- }
- return {
- ...item,
- render: (text) => {
- return
{text};
- }
- };
+ const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
+ dataIndex: it.dataIndex,
+ width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 120 : it.dataIndex === "taxAgentName" ? 176 : 150,
+ title: it.title, align: "left",
+ fixed: (idx === 0 || idx === 1 || idx === 2) ? "left" : it.dataIndex === "operate" ? "right" : "",
+ ellipsis: true
+ }));
+ this.postMessageToChild({
+ columns, showOperateBtn, selectedKey: this.state.selectedKey,
+ dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
+ showSum: false, pageInfo: this.state.pageInfo
});
};
handleEdit = (record) => {
@@ -635,13 +579,14 @@ class Index extends Component {
current: 1,
pageSize: 10
}
+ }, () => {
+ if (!this.handleChangeDebounce) {
+ this.handleChangeDebounce = _.debounce(() => {
+ this.query();
+ }, 500);
+ }
+ this.handleChangeDebounce();
});
- if (!this.handleChangeDebounce) {
- this.handleChangeDebounce = _.debounce(() => {
- this.query();
- }, 500);
- }
- this.handleChangeDebounce();
};
//编辑保存
handleSave = () => {
@@ -851,6 +796,7 @@ class Index extends Component {
style={{ display: "none" }}
comsWeaTableStore={tableStore}
needScroll={true}
+ columns={this.getColumns()}
/>
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.less b/pc4mobx/hrmSalary/pages/payrollFiles/index.less
index 72e677e7..3ca1c22b 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.less
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.less
@@ -7,6 +7,7 @@
.tableWrapper {
flex: 1;
overflow: hidden;
+ padding: 16px 16px 0 16px;
.ant-spin-nested-loading, .ant-spin-container {
height: 100%;
From 087e9d1abed1dd53c484335c8b03ed4b13994449 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, 26 May 2023 10:47:02 +0800
Subject: [PATCH 06/10] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8=E6=94=B9=E9=80=A0=E5=AE=8C?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payrollFiles/index.js | 36 -------------------
1 file changed, 36 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index d20192a3..cf91c933 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -650,34 +650,13 @@ class Index extends Component {
tabCount,
selectedKey,
loading,
- dataSource,
pageInfo,
showSearchAd,
- selectedRowKeys,
slideParams,
changeSalaryVisible,
paysetParams
} = this.state;
const { payrollFilesStore: { tableStore } } = this.props;
- const pagination = {
- current: pageInfo.current,
- pageSize: pageInfo.pageSize,
- total: pageInfo.total,
- showTotal: total => `共 ${total} 条`,
- showQuickJumper: true,
- showSizeChanger: true,
- pageSizeOptions: ["10", "20", "50", "100"],
- onShowSizeChange: (current, pageSize) => {
- this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
- this.query();
- });
- },
- onChange: current => {
- this.setState({ pageInfo: { ...pageInfo, current } }, () => {
- this.query();
- });
- }
- };
const renderSearch = () => {
const searchItems = [
{ com: this.Input("姓名", "username") },
@@ -713,10 +692,6 @@ class Index extends Component {
})}> 重置 ,
];
- const rowSelection = {
- selectedRowKeys,
- onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
- };
const rightMenu = [
{
key: "BTN_COLUMN",
@@ -779,17 +754,6 @@ class Index extends Component {
id="atdTable"
/>
- {/*
*/}
- {/* */}
- {/**/}
{/*人员卡片*/}
Date: Fri, 26 May 2023 10:47:20 +0800
Subject: [PATCH 07/10] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=97=E8=A1=A8=E6=94=B9=E9=80=A0=E5=AE=8C?=
=?UTF-8?q?=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payrollFiles/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
index cf91c933..8fb623fa 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js
@@ -749,8 +749,8 @@ class Index extends Component {
From 167564053bd7b6c6a1143a1eccbb29de44cfecaf 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, 26 May 2023 11:53:34 +0800
Subject: [PATCH 08/10] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E8=B5=84?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=AF=BC=E5=87=BA=E5=85=A8=E9=83=A8bug?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js
index 78a36b27..4845c1b4 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js
@@ -17,11 +17,11 @@ class ExportMenu extends Component {
case "fixed":
runStatusList = "FIXED,SUSPEND";
break;
- case "SUSPEND":
+ case "suspend":
runStatusList = _.upperCase(selectedKey);
break;
case "stop":
- runStatusList = 'STOP_FROM_PENDING,STOP_FROM_SUSPEND';
+ runStatusList = "STOP_FROM_PENDING,STOP_FROM_SUSPEND";
break;
default:
break;
From 11ac288541d124ab9eeac33a6bd9cb5f60f7ae0a 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, 26 May 2023 14:51:17 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E5=88=86=E6=9E=90=E6=B7=BB=E5=8A=A0=E5=91=98=E5=B7=A5=E6=98=8E?=
=?UTF-8?q?=E7=BB=86=E5=88=97=E8=A1=A8=E7=9A=84=E7=BB=9F=E8=AE=A1=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/employeeDetails.js | 15 +---
pc4mobx/hrmSalary/pages/employeeView/index.js | 87 ++++++++++++++-----
pc4mobx/hrmSalary/stores/payrollFiles.js | 22 ++++-
3 files changed, 87 insertions(+), 37 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
index 1360fb57..dc89547d 100644
--- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
+++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js
@@ -6,7 +6,6 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
-import { Dropdown, Menu } from "antd";
import { statisticsEmployeeList } from "../../../apis/statistics";
import "../index.less";
@@ -51,20 +50,12 @@ class EmployeeDetails extends Component {
pageInfo: { ...pageInfo, current, pageSize, total },
dataSource,
columns: [...columns, {
- title: "",
+ title: "操作",
dataIndex: "operate",
width: 80,
render: (_, record) => {
- return ;
+ return {getLabel(111, "查看")};
}
}]
});
diff --git a/pc4mobx/hrmSalary/pages/employeeView/index.js b/pc4mobx/hrmSalary/pages/employeeView/index.js
index 1d220a8c..412da738 100644
--- a/pc4mobx/hrmSalary/pages/employeeView/index.js
+++ b/pc4mobx/hrmSalary/pages/employeeView/index.js
@@ -6,17 +6,19 @@
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
+import { WeaTableNew } from "comsMobx";
+import { toJS } from "mobx";
import { Spin } from "antd";
import { inject, observer } from "mobx-react";
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
-import { statisticsEmployeeDetailList } from "../../apis/statistics";
import { optionAddWhole } from "../../util/options";
import moment from "moment";
import "./index.less";
+const WeaTableComx = WeaTableNew.WeaTable;
const { getLabel } = WeaLocaleProvider;
-@inject("taxAgentStore")
+@inject("taxAgentStore", "payrollFilesStore")
@observer
class Index extends Component {
constructor(props) {
@@ -24,9 +26,9 @@ class Index extends Component {
this.state = {
loading: false,
taxAgentId: "",
+ countResult: {},
salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
dataSource: [],
- columns: [],
pageInfo: {
current: 1,
pageSize: 10,
@@ -47,11 +49,18 @@ class Index extends Component {
handleReceive = ({ data }) => {
const { type, payload: { id, params } = {} } = data;
- const { columns, dataSource, pageInfo } = this.state;
+ const { dataSource, pageInfo, countResult } = this.state;
+ const { payrollFilesStore: { employeeTableStore } } = this.props;
+ const columns = _.filter(toJS(employeeTableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
if (type === "init") {
this.postMessageToChild({
- columns, dataSource,
- showSum: false, pageInfo
+ columns: _.map(columns, (it, idx) => ({
+ ...it,
+ width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
+ fixed: (idx === 1 || idx === 0) ? "left" : "",
+ ellipsis: true
+ })), dataSource, countResult,
+ showSum: true, pageInfo
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
@@ -62,14 +71,14 @@ class Index extends Component {
};
postMessageToChild = (payload) => {
const childFrameObj = document.getElementById("atdTable");
- const { dataSource, columns, showSum, pageInfo } = payload;
+ const { dataSource, columns, showSum, pageInfo, countResult } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, pageInfo
+ dataSource, columns, showSum, pageInfo, countResult
}), "*");
};
statisticsEmployeeDetailList = () => {
- const { params: { employeeId } } = this.props;
+ const { params: { employeeId }, payrollFilesStore: { statisticsEmployeeDetailList } } = this.props;
const { taxAgentId, salaryMonth, pageInfo } = this.state;
const payload = {
employeeId, taxAgentId,
@@ -80,30 +89,43 @@ class Index extends Component {
statisticsEmployeeDetailList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
- const { columns, pageInfo: { list, pageNum: current, pageSize, total } } = data;
+ const { countResult, pageInfo: { list, pageNum: current, pageSize, total } } = data;
this.setState({
- columns: _.map(columns, (it, idx) => ({
- ...it,
- dataIndex: it.text, width: 150,
- title: it.width, align: "left",
- fixed: (idx === 1 || idx === 0) ? "left" : "",
- ellipsis: true
- })),
+ countResult,
dataSource: list || [],
pageInfo: { ...pageInfo, current, pageSize, total }
}, () => {
- this.postMessageToChild({
- columns: this.state.columns,
- dataSource: this.state.dataSource,
- showSum: false, pageInfo: this.state.pageInfo
- });
+ // this.postMessageToChild({
+ // columns: this.state.columns,
+ // dataSource: this.state.dataSource,
+ // showSum: false, pageInfo: this.state.pageInfo
+ // });
});
}
}).catch(() => this.setState({ loading: false }));
};
+ getColumns = () => {
+ const { dataSource, pageInfo, countResult } = this.state;
+ const { payrollFilesStore: { employeeTableStore } } = this.props;
+ const columns = _.filter(toJS(employeeTableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
+ this.postMessageToChild({
+ columns: _.map(columns, (it, idx) => ({
+ ...it,
+ width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
+ fixed: (idx === 1 || idx === 0) ? "left" : "",
+ ellipsis: true
+ })), dataSource, countResult,
+ showSum: true, pageInfo
+ });
+ };
+
render() {
- const { location, taxAgentStore: { showOperateBtn, taxAgentOption } } = this.props;
+ const {
+ location,
+ taxAgentStore: { showOperateBtn, taxAgentOption },
+ payrollFilesStore: { employeeTableStore }
+ } = this.props;
const { salaryMonth, taxAgentId, loading } = this.state;
const { query: { dept, name } } = location;
const btns = [
@@ -112,11 +134,22 @@ class Index extends Component {
this.setState({ taxAgentId: v }, () => this.statisticsEmployeeDetailList())}/>
];
+ const dropMenuDatas = [
+ {
+ key: "BTN_COLUMN",
+ icon: ,
+ content: "显示列定制",
+ onClick: () => {
+ employeeTableStore.setColSetVisible(true);
+ employeeTableStore.tableColSet(true);
+ }
+ }
+ ];
return (
{name}{dept}}
icon={} buttons={showOperateBtn ? btns : []}
- iconBgcolor="#F14A2D" showDropIcon={false}
+ iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={dropMenuDatas}
>
@@ -128,6 +161,12 @@ class Index extends Component {
/>
+
);
}
diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js
index 4fc882cb..d3e7094e 100644
--- a/pc4mobx/hrmSalary/stores/payrollFiles.js
+++ b/pc4mobx/hrmSalary/stores/payrollFiles.js
@@ -1,12 +1,15 @@
import { action, observable } from "mobx";
import { WeaTableNew } from "comsMobx";
import * as API from "../apis/payrollFiles";
+import { statisticsEmployeeDetailList } from "../apis/statistics";
const { TableStore } = WeaTableNew;
export class PayrollFilesStore {
@observable tableStore = new TableStore();
- @action("列表查询")
+ @observable employeeTableStore = new TableStore();
+
+ @action("薪资档案-列表查询")
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
return new Promise((resolve, reject) => {
const { departmentIds, positionIds, subcompanyIds, ...extra } = searchItemsValue;
@@ -28,4 +31,21 @@ export class PayrollFilesStore {
});
});
};
+
+ @action("薪酬统计列表员工详情-列表查询")
+ statisticsEmployeeDetailList = (payload) => {
+ return new Promise((resolve, reject) => {
+ statisticsEmployeeDetailList(payload).then(res => {
+ const { data, status } = res;
+ if (status) {
+ const { dataKey } = data;
+ const { datas } = dataKey;
+ this.employeeTableStore.getDatas(datas); // table 请求数据
+ }
+ resolve(res);
+ }).catch(() => {
+ reject();
+ });
+ });
+ };
}
From 0e9efa66ab4a2d677f6df4d358dbd9abdc0c92a4 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, 26 May 2023 16:05:28 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E5=88=86=E6=9E=90-=E5=91=98=E5=B7=A5=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/employeeView/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/employeeView/index.js b/pc4mobx/hrmSalary/pages/employeeView/index.js
index 412da738..f56c3854 100644
--- a/pc4mobx/hrmSalary/pages/employeeView/index.js
+++ b/pc4mobx/hrmSalary/pages/employeeView/index.js
@@ -57,7 +57,7 @@ class Index extends Component {
columns: _.map(columns, (it, idx) => ({
...it,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
- fixed: (idx === 1 || idx === 0) ? "left" : "",
+ fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
ellipsis: true
})), dataSource, countResult,
showSum: true, pageInfo
@@ -113,7 +113,7 @@ class Index extends Component {
columns: _.map(columns, (it, idx) => ({
...it,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
- fixed: (idx === 1 || idx === 0) ? "left" : "",
+ fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
ellipsis: true
})), dataSource, countResult,
showSum: true, pageInfo