diff --git a/pc4mobx/hrmSalary/apis/archive.js b/pc4mobx/hrmSalary/apis/archive.js
index fe9af3ed..6faaad01 100644
--- a/pc4mobx/hrmSalary/apis/archive.js
+++ b/pc4mobx/hrmSalary/apis/archive.js
@@ -5,6 +5,10 @@ import { postFetch } from "../util/request";
export const getArchiveList = params => {
return postFetch("/api/bs/hrmsalary/salaryArchive/list", params);
};
+//薪资档案的高级搜索
+export const getSaCondition = params => {
+ return WeaTools.callApi("/api/bs/hrmsalary/archives/getSearchCondition", "get", params);
+};
//薪资档案-获取薪资档案详情表单
export const getArchiveForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getForm", "get", params);
@@ -100,7 +104,3 @@ export const getSingleSalaryItemInfo = (params) => {
export const editSingleSalaryItem = (params) => {
return postFetch("/api/bs/hrmsalary/salaryArchive/adjustRecord/editSingleSalaryItem", params);
};
-// 基数调整记录列表
-export const getAdjustHistoryList = (params) => {
- return postFetch("/api/bs/hrmsalary/archives/getAdjustHistoryList", params);
-};
diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js
index 63153659..b204dfac 100644
--- a/pc4mobx/hrmSalary/apis/welfareArchive.js
+++ b/pc4mobx/hrmSalary/apis/welfareArchive.js
@@ -105,5 +105,8 @@ export const exportArchives = (ids) => {
window.URL.revokeObjectURL(url);
}));
};
-
+// 基数调整记录列表
+export const getAdjustHistoryList = (params) => {
+ return postFetch("/api/bs/hrmsalary/archives/getAdjustHistoryList", params);
+};
diff --git a/pc4mobx/hrmSalary/components/mobileTemplate/index.js b/pc4mobx/hrmSalary/components/mobileTemplate/index.js
index aeb0898e..7d2106ce 100644
--- a/pc4mobx/hrmSalary/components/mobileTemplate/index.js
+++ b/pc4mobx/hrmSalary/components/mobileTemplate/index.js
@@ -25,10 +25,10 @@ class Index extends Component {
{theme || ""}
{moment().format("YYYY-MM-DD HH:mm:ss")}
- {
- background &&
-
- }
+ {/*{*/}
+ {/* background &&*/}
+ {/*
*/}
+ {/*}*/}
{
!onlyOneGrup && tipPosi === "1" && tip &&
diff --git a/pc4mobx/hrmSalary/components/pcTemplate/content.js b/pc4mobx/hrmSalary/components/pcTemplate/content.js
index a294e2df..b4b63874 100644
--- a/pc4mobx/hrmSalary/components/pcTemplate/content.js
+++ b/pc4mobx/hrmSalary/components/pcTemplate/content.js
@@ -17,10 +17,10 @@ class Content extends Component {
{moment(sendTime).format("YYYY-MM-DD HH:mm:ss")}
- {
- background &&
-
- }
+ {/*{*/}
+ {/* background &&*/}
+ {/*
*/}
+ {/*}*/}
{
!onlyOneGrup && tipPosi.toString() === "1" && tip &&
{tip}
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 8632db09..d246f2ed 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -4,7 +4,8 @@ import { WeaLocaleProvider } from "ecCom";
import MySalaryMobile from "./pages/mySalaryMobile";
import MySalary from "./pages/mySalaryBenefits";
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";
@@ -22,7 +23,8 @@ import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
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";
@@ -46,6 +48,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";
@@ -117,6 +120,7 @@ const Routes = (
component={SocialSecurityBenefits}>
+
+
);
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
index 413bbd25..429ea550 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
@@ -70,13 +70,23 @@ class EditCalcTable extends Component {
salaryCalcSlide: { visible: true, id: salaryCalcId }
});
break;
+ case "DIAGRAM":
+ const { salarySobId } = this.props;
+ const { salaryItemId: itemid, acctEmpId } = params;
+ window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${itemid}?acctEmpId=${acctEmpId}`, "_blank");
+ break;
default:
break;
}
}
};
updateLockStatus = (payload) => {
- const { lockStatus } = payload;
+ const { salarySobId } = this.props;
+ const { lockStatus, salaryItemId } = payload;
+ if (lockStatus === "DIAGRAM") {
+ window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/topologyView/${salarySobId}/${salaryItemId}`, "_blank");
+ return;
+ }
Modal.confirm({
title: getLabel(131329, "信息确认"),
content:
@@ -169,7 +179,8 @@ class EditCalcTable extends Component {
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
- "批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新")
+ "批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
+ "查看拓扑图": getLabel(111, "查看拓扑图")
};
this.setState({ originPayloadData: { ...payload, i18n } });
const childFrameObj = document.getElementById("atdTable");
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
index 5a3b1c58..d2b8ae4a 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
@@ -150,6 +150,7 @@ class Index extends Component {
/>
this.calcTableRef = dom} selectedKey={selectedKey}
+ salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
{/*陕西万众项目-创建薪资核算模板弹框*/}
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/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
index 423a7fe7..63421981 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
@@ -251,7 +251,13 @@ class LedgerSalaryItemTable extends Component {
{
title: "名称",
dataIndex: "name",
- key: "name"
+ key: "name",
+ render: (text, record) => {
+ 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 36bf1bec..5692c526 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/mobilePayroll/passSetDialog.js b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js
index f857ff41..f857c6d6 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js
@@ -82,7 +82,7 @@ class PassSetDialog extends Component {
return;
}
if (secondaryPwd1 !== secondaryPwd2) {
- message.error(getLabel("504376", "密码确认不正确!"));
+ message.error(getLabel(504376, "密码确认不正确!"));
return;
}
} else {
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js
index 7d6d9fb8..d2be756f 100644
--- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js
+++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js
@@ -105,7 +105,6 @@ export default class BaseInformForm extends React.Component {
ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay,
autoSendCycleType
} = request;
-
return (
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
index 6a2bf87a..893afa11 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js
@@ -38,7 +38,8 @@ export default class Index extends Component {
confValue: "0",
withDrawTaxDeclaration: "0",
extEmpsWitch: "0",
- salaryAcctFixedColumns: 0
+ salaryAcctFixedColumns: 0,
+ welBaseDiffByPerAndCom: "0",
},
showEncryptOperationButton: "",
progressVisible: false,
@@ -66,7 +67,8 @@ export default class Index extends Component {
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue,
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
- OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0"
+ OPEN_APPLICATION_ENCRYPT: enctry = "1", extEmpsWitch = "0", salaryAcctFixedColumns = "0",
+ welBaseDiffByPerAndCom = "0",
}
} = sysInfo;
// const { data: { ascOrDesc, orderRule } } = orderRules;
@@ -87,7 +89,8 @@ export default class Index extends Component {
saveParams: {
...saveParams,
ascOrDesc, orderRule, rule, enctry, matchRule, confValue, withDrawTaxDeclaration, salaryAcctFixedColumns,
- extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0"
+ extEmpsWitch, operateTaxDeclaration: (operateTaxDeclaration && operateTaxDeclaration !== "0") ? "1" : "0",
+ welBaseDiffByPerAndCom
}
});
}
@@ -307,6 +310,13 @@ export default class Index extends Component {
confValue: !_.isNil(val) ? val.toString() : "0"
});
break;
+ case "welBaseDiffByPerAndCom":
+ this.saveSysOperate({
+ title: getLabel(111, "福利档案基数区分个人和公司"),
+ module: "basic", confKey: key,
+ confValue: val
+ });
+ break;
default:
break;
}
@@ -342,7 +352,8 @@ export default class Index extends Component {
confValue,
withDrawTaxDeclaration,
extEmpsWitch,
- salaryAcctFixedColumns
+ salaryAcctFixedColumns,
+ welBaseDiffByPerAndCom
} = saveParams;
return (
@@ -398,6 +409,12 @@ export default class Index extends Component {
onChange={val => this.handleChange("confValue", val)}/>
+
+
+ this.handleChange("welBaseDiffByPerAndCom", val)}/>
+
+
this.handleChangeSalaryFiledItems(key, v)}/>
- {key === "width" &&
+ {key === "width" && display &&
px}
: null
diff --git a/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
new file mode 100644
index 00000000..710a6387
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/salaryItemDiagram/index.js
@@ -0,0 +1,22 @@
+/*
+ * Author: 黎永顺
+ * name: 薪资档案拓扑图
+ * Description:
+ * Date: 2023/10/19
+ */
+import React, { Component } from "react";
+
+class Index extends Component {
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
index e4e94622..6ba15925 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js
@@ -1,10 +1,3 @@
-import { WeaSwitch } from "comsMobx";
-import { Button } from "antd";
-import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
-
-const getKey = WeaTools.getKey;
-const getLabel = WeaLocaleProvider.getLabel;
-
export const tabCondition = [
{
color: "#000000",
@@ -42,97 +35,3 @@ export const tabCondition = [
viewcondition: "ext"
}
];
-export const logConditions = [
- {
- items: [
- {
- colSpan: 1,
- conditionType: "BROWSER",
- browserConditionParam: {
- completeParams: {},
- conditionDataParams: {},
- dataParams: {},
- destDataParams: {},
- hasAddBtn: false,
- hasAdvanceSerach: true,
- idSeparator: ",",
- isAutoComplete: 1,
- isDetail: 0,
- isMultCheckbox: false,
- isSingle: true,
- linkUrl: "/hrm/resource/HrmResource.jsp?id=",
- pageSize: 10,
- quickSearchName: "",
- replaceDatas: [],
- title: "",
- type: "1"
- },
- domkey: ["employeeId"],
- fieldcol: 17,
- label: "对象",
- lanId: 106,
- labelcol: 7,
- value: ""
- },
- {
- colSpan: 1,
- conditionType: "BROWSER",
- browserConditionParam: {
- completeParams: {},
- conditionDataParams: {},
- dataParams: {},
- destDataParams: {},
- hasAddBtn: false,
- hasAdvanceSerach: true,
- idSeparator: ",",
- isAutoComplete: 1,
- isDetail: 0,
- isMultCheckbox: false,
- isSingle: true,
- linkUrl: "/hrm/resource/HrmResource.jsp?id=",
- pageSize: 10,
- quickSearchName: "",
- replaceDatas: [],
- title: "",
- type: "1"
- },
- domkey: ["operator"],
- fieldcol: 17,
- label: "操作人",
- lanId: 111,
- labelcol: 7,
- value: ""
- }
- ],
- defaultshow: true
- }
-];
-export const getLogSearchsForm = (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: (
-
-
- {
- getKey(fields) === "operator" &&
-
- }
- ),
- colSpan: 1
- });
- });
- group.push(
- );
- });
- return group;
-};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index 4d1e44f3..afb23c81 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -17,7 +17,7 @@ import UnifiedTable from "../../../components/UnifiedTable";
import { convertToUrlString, getURLParameters } from "../../../util/url";
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
import ImportDialog from "../../../components/importDialog";
-import OperateLogDialog from "./operateLogDialog";
+import OperateLogDialog from "../welfareArchive/components/logDialog";
import "./index.less";
import { sysinfo } from "../../../apis/ruleconfig";
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
index 59293057..67111a4e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
@@ -85,36 +85,3 @@
}
}
}
-
-
-//重构-社保福利档案
-.logDialog {
- .wea-dialog-body {
- overflow-y: hidden;
- }
-
- .logDialogContent {
- background: #F6F6F6;
- padding: 16px;
- width: 100%;
- height: 100%;
-
- .wea-search-group {
- padding: 0;
- margin-bottom: 10px;
- background: #FFF;
-
- .wea-form-cell {
- padding: 0;
-
- .wea-form-item {
- padding: 10px;
- }
- }
- }
-
- .logTable {
- background: #FFFFFF;
- }
- }
-}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
index fe4bc74c..374bae4e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js
@@ -125,7 +125,7 @@ class CustomBenefitsTable extends Component {
content: getLabel(543231, "确认删除本条数据吗?"),
onOk: () => {
message.destroy();
- message.loading("正在删除中...", 0);
+ message.loading(getLabel(529063, "正在删除中..."), 0);
const payload = { id };
deleteCustomCategory(payload).then(({ status, errormsg }) => {
message.destroy();
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.js
new file mode 100644
index 00000000..ab1efc11
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.js
@@ -0,0 +1,33 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利档案页面重构-高级搜索
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { Button } from "antd";
+import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("archivesStore")
+@observer
+class Index extends Component {
+ render() {
+ const { archivesStore: { welfareForm } } = this.props;
+ return (
+
+ 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/archives/operateLogDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.js
similarity index 94%
rename from pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js
rename to pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.js
index 6f1ab4ed..2ac65e14 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.js
@@ -1,15 +1,16 @@
/*
* Author: 黎永顺
- * name: 社保福利档案-操作日志
+ * name:社保福利档案-操作日志
* Description:
- * Date: 2023/10/23
+ * Date: 2023/11/6
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
-import { getAdjustHistoryList } from "../../../../apis/archive";
-import { getLogSearchsForm, logConditions } from "../config";
+import { getAdjustHistoryList } from "../../../../../apis/welfareArchive";
+import { getLogSearchsForm, logConditions } from "../../config";
import moment from "moment";
+import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.less
new file mode 100644
index 00000000..dc0bc94c
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/logDialog/index.less
@@ -0,0 +1,31 @@
+//重构-社保福利档案
+.logDialog {
+ .wea-dialog-body {
+ overflow-y: hidden;
+ }
+
+ .logDialogContent {
+ background: #F6F6F6;
+ padding: 16px;
+ width: 100%;
+ height: 100%;
+
+ .wea-search-group {
+ padding: 0;
+ margin-bottom: 10px;
+ background: #FFF;
+
+ .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 10px;
+ }
+ }
+ }
+
+ .logTable {
+ background: #FFFFFF;
+ }
+ }
+}
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/welfareArchivesImportDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js
new file mode 100644
index 00000000..149a304c
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareArchivesImportDialog/index.js
@@ -0,0 +1,103 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利档案页面重构-导入
+ * Description:
+ * Date: 2023/11/6
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
+import ImportDialog from "../../../../../components/importDialog";
+import { convertToUrlString, getURLParameters } from "../../../../../util/url";
+import { importBatch } from "../../../../../apis/welfareArchive";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("archivesStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ importDialog: {
+ nextloading: false, link: "", importResult: {}, imageId: "",
+ previewUrl: "/api/bs/hrmsalary/scheme/preview"
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ const { runStatuses, archivesStore: { welfareForm } } = nextProps;
+ const payload = {
+ [runStatuses !== "ext" ? "exportData" : "extWelArchiveList"]: "false",
+ runStatuses, ...welfareForm.getFormParams()
+ };
+ this.setState({
+ importDialog: {
+ ...this.state.importDialog,
+ link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}`
+ }
+ });
+ } else {
+ this.setState({
+ importDialog: {
+ nextloading: false, link: "", importResult: {}, imageId: "",
+ previewUrl: "/api/bs/hrmsalary/scheme/preview"
+ }
+ });
+ }
+ }
+
+ handleImport = (payload) => {
+ const { importDialog } = this.state, { runStatuses: runStatus } = this.props;
+ this.setState({ importDialog: { ...importDialog, nextloading: true } });
+ importBatch({ ...payload, runStatus: runStatus.split(",")[0] }).then(({ data, status }) => {
+ this.setState({ importDialog: { ...importDialog, nextloading: false } });
+ if (status) {
+ this.setState({
+ importDialog: { ...importDialog, ...payload, importResult: data }
+ });
+ }
+ }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
+ };
+
+ render() {
+ const { runStatuses, archivesStore: { welfareForm } } = this.props;
+ const { importDialog } = this.state;
+ const { link } = importDialog;
+ return (
+ this.setState({
+ importDialog: {
+ ...importDialog, importResult: {}, imageId: "", link: ""
+ }
+ })}
+ exportDataDom={
+ {
+ let payload = {
+ exportData: val === "1", runStatuses, ...welfareForm.getFormParams()
+ };
+ runStatuses === "ext" && (payload = { ...payload, extWelArchiveList: true, runStatuses: "" });
+ this.setState({
+ importDialog: {
+ ...importDialog,
+ link: `/api/bs/hrmsalary/scheme/template/export?${convertToUrlString(payload)}`
+ }
+ });
+ }}
+ />
+ }
+ nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
+ nextUplaodCallback={imageId => this.handleImport({ imageId })}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
new file mode 100644
index 00000000..4e7c7836
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -0,0 +1,310 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利档案页面重构-查看编辑弹框
+ * Description:
+ * Date: 2023/11/6
+ */
+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, toDecimal_n } from "../../../../../util";
+import { Button, message, Modal } from "antd";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("archivesStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, conditions: [], formData: {}
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ 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 } } = nextProps;
+ document.querySelector(".salary-welfare-archive").classList.remove("zIndex0-welfare-archive");
+ initWelfareProfileForm();
+ }
+ }
+
+ getBaseForm = async (props) => {
+ const { data: taxAgentList } = await getTaxAgentSelectList();
+ const {
+ archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase, runStatuses,
+ employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
+ } = props;
+ let socialComData = {}, fundComData = {}, otherComData = {};
+ if (!_.isNil(socialBase.comItems) && !_.isNil(socialBase.comData)) {
+ _.forEach(getConditionDomkeys(socialBase.comItems), o => {
+ socialComData = {
+ ...socialComData,
+ [`${o}_com`]: socialBase.comData[o]
+ };
+ });
+ }
+ if (!_.isNil(fundBase.comItems) && !_.isNil(fundBase.comData)) {
+ _.forEach(getConditionDomkeys(fundBase.comItems), o => {
+ fundComData = {
+ ...fundComData,
+ [`${o}_com`]: fundBase.comData[o]
+ };
+ });
+ }
+ if (!_.isNil(otherBase.comItems) && !_.isNil(otherBase.comData)) {
+ _.forEach(getConditionDomkeys(otherBase.comItems), o => {
+ otherComData = {
+ ...otherComData,
+ [`${o}_com`]: otherBase.comData[o]
+ };
+ });
+ }
+ const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
+ API.getBaseForm(payload).then(({ status, data }) => {
+ if (status) {
+ const { data: result } = data;
+ const formData = {
+ ...result, ...socialBaseData, ...fundBaseData, ...othersBaseData,
+ ...socialBase.data, ...fundBase.data, ...otherBase.data,
+ ...socialComData, ...fundComData, ...otherComData
+ };
+ this.setState({
+ formData,
+ conditions: _.map(welfareConditions, o => {
+ 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) };
+ })
+ };
+ } 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" || o.title === "fund" || o.title === "others") {
+ const title = o.title === "social" ? getLabel(543194, "社保基础信息") : o.title === "fund" ? getLabel(543197, "公积金基础信息") : getLabel(543198, "其他福利基础信息");
+ return {
+ ...o, title,
+ items: _.map(o.items, g => {
+ 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),
+ 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),
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr
+ };
+ })
+ };
+ }
+ return {
+ ...o, items: _.map(o.items, g => {
+ return {
+ ...g, label: getLabel(g.lanId, g.label),
+ viewAttr: runStatuses === "4,5" ? 1 : g.viewAttr
+ };
+ })
+ };
+ })
+ }, () => {
+ 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]: formData[k] || "" });
+ }
+ });
+ });
+ }
+ });
+ };
+ covertPayload = (welfareType, underTakeType, paymentForm, paymentComForm) => {
+ const { archivesStore: { welfareProfileForm } } = this.props;
+ const welfareData = welfareProfileForm.getFormParams();
+ const { formData } = this.state;
+ return {
+ baseForm: JSON.stringify({
+ ...formData[welfareType], ..._.reduce(_.keys(formData[welfareType]), (pre, cur) => {
+ if (welfareData[cur]) return { ...pre, [cur]: welfareData[cur] };
+ return { ...pre };
+ }, {}),
+ underTake: welfareData[`${underTakeType}UnderTake`]
+ }),
+ paymentForm: !_.isEmpty(paymentForm) ? JSON.stringify(_.reduce(paymentForm, (pre, cur) => {
+ if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: toDecimal_n(formData[cur], 2).toString() };
+ return { ...pre, [cur]: "0" };
+ }, {})) : "",
+ paymentComForm: !_.isEmpty(paymentComForm) ? JSON.stringify(_.reduce(paymentComForm, (pre, cur) => {
+ if (formData[`${cur}_com`] || formData[`${cur}_com`] === 0) return {
+ ...pre,
+ [cur]: toDecimal_n(formData[`${cur}_com`], 2).toString()
+ };
+ return { ...pre, [cur]: "0" };
+ }, {})) : "",
+ welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
+ };
+ };
+ save = async () => {
+ const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
+ fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
+ otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
+ if (!(socailPayload.validate && fundPayload.validate && otherPayload.validate)) {
+ message.warning(getLabel(111, "请维护起始缴纳月!"));
+ return;
+ }
+ this.setState({ loading: true });
+ 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(true);
+ } else {
+ message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
+ }
+ };
+ 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;
+ setHasBeenModify(true);
+ if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") {
+ this.setState({
+ conditions: _.map(this.state.conditions, o => {
+ if (
+ (o.typename === "SOCIAL_SECURITY" && changeKey === "socialSchemeId") ||
+ (o.typename === "ACCUMULATION_FUND" && changeKey === "fundSchemeId") ||
+ (o.typename === "OTHER" && changeKey === "otherSchemeId")
+ ) {
+ return {
+ ...o, items: _.map(o.items, g => {
+ if (getKey(g).indexOf("StartTime") !== -1) {
+ return {
+ ...g, viewAttr: changeVal ? 3 : g.viewAttr
+ };
+ }
+ return { ...g };
+ })
+ };
+ }
+ return { ...o };
+ })
+ });
+ onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, {
+ employeeId,
+ paymentOrganization
+ });
+ }
+ };
+ handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
+ 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 } }
+ });
+ renderTitle = () => {
+ const { loading } = this.state;
+ const { runStatuses } = this.props;
+ return
+
+
+
{getLabel(543191, "员工福利档案")}
+
+
+ {
+ runStatuses !== "4,5" &&
+
+ }
+
+
;
+ };
+ 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, formData } = this.state;
+ return (
+
+ {
+ getWelfareSearchsForm(
+ welfareProfileForm, conditions, this.handleFormChange, this.handleNoPaymentChange, this.handleExtraChange,
+ this.handleSameChange, formData, this.props
+ )
+ }
+ }
+ />
+ );
+ }
+}
+
+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
new file mode 100644
index 00000000..ae5ed977
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -0,0 +1,304 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利档案页面重构-列表
+ * Description:
+ * 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 WelfareEditArchiveSlide from "../welfareEditArchiveSlide";
+import * as API from "../../../../../apis/welfareArchive";
+import { welfareTypeEnum } from "../../config";
+import { getConditionDomkeys, getConditionFields } from "../../../../../util";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const APILIST = {
+ runStatuses: API.queryList,
+ ext: API.getExtTable,
+ delToDo: API.updateRunStatus, //删除待办
+ delArchive: API.deleteArchive, //删除档案
+ addToPay: API.stayAddToPay, //增员
+ stayDelToStop: API.stayDelToStop, //减员
+ delToDoStay: API.cancelStayDel, //待减员-删除待办
+ cancelStop: API.cancelStopPayment //停缴员工-取消停缴
+};
+
+@inject("archivesStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [], columns: [], loading: false, selectedRowKeys: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ welfareEditSlide: { visible: false, employeeId: "", welfareTypeEnum: "", paymentOrganization: "" }
+ };
+ }
+
+ 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) {
+ 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));
+ }
+ if ((nextProps.runStatuses !== this.props.runStatuses)) {
+ this.setState({
+ dataSource: [], columns: [], loading: false, selectedRowKeys: [],
+ welfareEditSlide: { ...this.state.welfareEditSlide, visible: false }
+ });
+ }
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ 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({
+ pageInfo: { ...this.state.pageInfo, ...params }
+ }, () => this.getWelfareList(this.props));
+ break;
+ case "CHECKBOX":
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ 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["other"] })
+ ]);
+ this.setState({
+ welfareEditSlide: {
+ ...this.state.welfareEditSlide, employeeId, paymentOrganization, runStatuses,
+ socialItems: socialItems.data.items[0].items,
+ socialBaseData: {
+ SOCIAL_SECURITY: { ...socialItems.data.data, socialUnderTake: socialItems.data.data.underTake }
+ },
+ fundItems: fundItems.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 } }
+ }
+ }, async () => {
+ const { socialBaseData, fundBaseData, othersBaseData } = this.state.welfareEditSlide;
+ const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData,
+ { ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData,
+ { OTHER: { otherSchemeId } } = othersBaseData;
+ 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["other"], schemeId: otherSchemeId })
+ ]);
+ this.setState({
+ welfareEditSlide: {
+ ...this.state.welfareEditSlide, visible: true,
+ socialBase: socialBase.data, fundBase: fundBase.data, otherBase: otherBase.data
+ }
+ });
+ });
+ break;
+ case "ADD-TO-PAY":
+ case "STAY-DEL-TO-STOP":
+ case "CANCEL-STOP":
+ case "DEL-TO-DO":
+ case "DEL-TO-DO-STAY":
+ const module = (id === "ADD-TO-PAY" || id === "STAY-DEL-TO-STOP" || id === "CANCEL-STOP") ?
+ [baseInfo] : { ids: [baseInfo], ...interfaceParams };
+ this.handleWelfareOpts(_.camelCase(id), module);
+ break;
+ case "DEL-ARCHIVE":
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(388758, "确认要删除吗?"),
+ onOk: () => this.handleWelfareOpts(_.camelCase(id), [baseInfo])
+ });
+ break;
+ default:
+ break;
+ }
+ }
+ };
+ getProfileTypeForm = async (props) => {
+ const { employeeId, paymentOrganization, welfareTypeEnum } = props;
+ const payload = { employeeId, paymentOrganization, welfareTypeEnum };
+ return API.getBaseForm(payload);
+ };
+ getPaymentForm = async (props) => {
+ return API.getPaymentForm({ ...props });
+ };
+ getWelfareList = (props) => {
+ const { pageInfo } = this.state;
+ const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = 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", ellipsis: true
+ };
+ }
+ return {
+ dataIndex, title, width, ellipsis: true
+ };
+ })
+ }, () => {
+ const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
+ onChangeTopTabCount(runStatuses, total);
+ this.postMessageToChild({
+ dataSource, pageInfo, selectedRowKeys, runStatuses,
+ columns, showOperateBtn
+ });
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ /*
+ * Author: 黎永顺
+ * Description:批量操作
+ * Params:
+ * Date: 2023/11/3
+ */
+ handleBatchOpt = (type, payload) => {
+ const { selectedRowKeys } = this.state;
+ if (_.isEmpty(selectedRowKeys)) {
+ message.warning(getLabel(543303, "请选择表格数据"));
+ return;
+ }
+ const params = _.isNil(payload) ? selectedRowKeys : { ids: selectedRowKeys, ...payload };
+ this.handleWelfareOpts(type, params);
+ };
+ handleWelfareOpts = (type, payload) => {
+ WeaLoadingGlobal.start();
+ APILIST[type](payload).then(({ status, data = {}, errormsg }) => {
+ WeaLoadingGlobal.destroy();
+ if (status) {
+ const { msg, type } = data;
+ if (type === "fail") {
+ message.error(msg);
+ } else if (type === "success") {
+ message.success(msg);
+ this.getWelfareList(this.props);
+ this.setState({ selectedRowKeys: [] });
+ } else {
+ message.success(getLabel(30700, "操作成功!"));
+ this.getWelfareList(this.props);
+ this.setState({ selectedRowKeys: [] });
+ }
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"), "编辑": getLabel(501169, "编辑"),
+ "增员": getLabel(543180, "增员"), "删除档案": getLabel(23238, "删除档案"),
+ "删除待办": getLabel(543181, "删除待办"), "减员": getLabel(543182, "减员"),
+ "查看": getLabel(33564, "查看"), "取消停缴": getLabel(543183, "取消停缴"),
+ "共": getLabel(18609, "共"), "条": getLabel(18256, "条")
+ };
+ 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) {
+ const { data: defVal, items, comData, comItems } = data;
+ this.setState({
+ welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
+ }, () => {
+ const perData = _.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
+ };
+ }, {});
+ if (!_.isNil(comItems)) {
+ const comDataTmpv = _.reduce(getConditionDomkeys(comItems), (pre, cur) => {
+ const minNum = !_.isNil(getConditionFields(comItems)[cur].min) ? Number(getConditionFields(comItems)[cur].min) : undefined,
+ maxNum = !_.isNil(getConditionFields(comItems)[cur].max) ? Number(getConditionFields(comItems)[cur].max) : undefined;
+ const val = !_.isNil(comData) ? Number(comData[cur]) : 0;
+ return {
+ ...pre,
+ [`${cur}_com`]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ }, {});
+ this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData, ...comDataTmpv });
+ return;
+ }
+ this.archiveSlideRef.wrappedInstance.updateFormData({ ...perData });
+ });
+ }
+ });
+ };
+
+ render() {
+ const { loading, dataSource, welfareEditSlide } = 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 : dataSource.length < 10 ? dataSource.length * 39 + 113 : parseFloat(dom.style.height) - 170;
+ }
+ return (
+
+
+
+
+ {/* 编辑产看员工福利档案*/}
+ this.archiveSlideRef = dom}
+ onClose={(isFresh) => this.setState({
+ welfareEditSlide: { ...welfareEditSlide, visible: false }
+ }, () => isFresh && this.getWelfareList(this.props))}
+ onChangeProgramme={this.handleChangeProgramme}
+ />
+
+ );
+ }
+}
+
+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..11c4531f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js
@@ -0,0 +1,44 @@
+/*
+ * 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() {
+ const { dataSource } = this.props;
+ return (
+
+
{getLabel(543177, "小提示")}
+
+ {
+ _.map(dataSource, item => (
{getLabel(item.lanId, item.title)}
))
+ }
+
+
+ );
+ }
+}
+
+export default Index;
+
+export const HelpfulDiv = () => {
+ return
+ {getLabel(544362, "1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月;")}
+ {getLabel(544365, "2、维护的所有的最后缴纳月都大于当前月,则该待办数据自动清除,不显示在待减员列表;")}
+ {getLabel(544366, "3、减员失败情况:①有起始缴纳月却未维护最后缴纳月;②员工存在未归档的核算数据;")}
+
;
+};
+
+export const CancelHelpfulDiv = () => {
+ return
+ {getLabel(544362, "1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月;")}
+ {getLabel(544363, "2、若员工当前不在停缴档案的个税扣缴义务人下,则不可取消停缴;")}
+ {getLabel(544364, "3、若员工当前在其他个税扣缴义务人下正在缴纳,也不可取消停缴;")}
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
new file mode 100644
index 00000000..5548c79d
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -0,0 +1,790 @@
+import React from "react";
+import {
+ WeaCheckbox,
+ WeaFormItem,
+ WeaHelpfulTip,
+ WeaInputNumber,
+ WeaLocaleProvider,
+ WeaSearchGroup,
+ WeaTools
+} from "ecCom";
+import { WeaSwitch } from "comsMobx";
+import { Button } from "antd";
+import AdvanceInputBtn from "./components/advanceInputBtn";
+import { CancelHelpfulDiv, HelpfulDiv } from "./components/welfareTip";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+//批量操作列表
+export const welfareTypeEnum = {
+ social: "SOCIAL_SECURITY",
+ fund: "ACCUMULATION_FUND",
+ other: "OTHER"
+};
+export const optTypeEnum = [
+ //批量增员
+ {
+ key: "batchStaffIncrease",
+ type: "addToPay",
+ payload: null
+ },
+ // 待增员-批量删除待办
+ {
+ key: "batchDeleteTodolist",
+ type: "delToDo",
+ payload: { runStatus: "4" }
+ },
+ // 待减员-批量删除待办
+ {
+ key: "batchDeleteTodolistStayDel",
+ type: "delToDoStay",
+ payload: { runStatus: "3" }
+ },
+ //批量减员
+ {
+ key: "batchReduction",
+ type: "stayDelToStop",
+ payload: null
+ },
+ //批量取消停缴
+ {
+ key: "batchCancellationOfSuspended",
+ type: "cancelStop",
+ payload: null
+ }
+];
+export const tabList = [
+ { viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" },
+ { viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" },
+ { viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" },
+ { viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" },
+ { viewcondition: "ext", title: getLabel(542679, "非系统人员"), 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: []
+ }
+];
+export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
+ let menus = [{
+ key: "log",
+ icon: ,
+ content: getLabel(111, "操作日志")
+ }];
+ if (showOperateBtn) {
+ switch (selectedKey) {
+ case "1":
+ menus = [
+ {
+ key: "fullStaffIncrease",
+ icon: ,
+ content: getLabel(543185, "全量增员")
+ },
+ {
+ key: "batchStaffIncrease",
+ icon: ,
+ content: getLabel(543187, "批量增员")
+ },
+ {
+ key: "batchDeleteTodolist",
+ icon: ,
+ content: getLabel(543186, "批量删除待办")
+ },
+ {
+ key: "exportAll",
+ icon: ,
+ content: getLabel(81272, "导出全部")
+ },
+ {
+ key: "exportSelected",
+ icon: ,
+ content: getLabel(512938, "导出选中")
+ },
+ ...menus
+ ];
+ break;
+ case "2,3":
+ menus = [
+ {
+ key: "exportAll",
+ icon: ,
+ content: getLabel(81272, "导出全部")
+ },
+ {
+ key: "exportSelected",
+ icon: ,
+ content: getLabel(512938, "导出选中")
+ },
+ ...menus
+ ];
+ break;
+ case "3":
+ menus = [
+ {
+ key: "fullReduction",
+ icon: ,
+ content: getLabel(543189, "全量减员")
+ },
+ {
+ key: "batchReduction",
+ icon: ,
+ content: getLabel(543188, "批量减员")
+ },
+ {
+ key: "batchDeleteTodolistStayDel",
+ icon: ,
+ content: getLabel(543186, "批量删除待办")
+ },
+ {
+ key: "exportAll",
+ icon: ,
+ content: getLabel(81272, "导出全部")
+ },
+ {
+ key: "exportSelected",
+ icon: ,
+ content: getLabel(512938, "导出选中")
+ },
+ ...menus
+ ];
+ break;
+ case "4,5":
+ menus = [
+ {
+ key: "batchCancellationOfSuspended",
+ icon: ,
+ content: getLabel(543190, "批量取消停缴")
+ },
+ {
+ key: "exportAll",
+ icon: ,
+ content: getLabel(81272, "导出全部")
+ },
+ {
+ key: "exportSelected",
+ icon: ,
+ content: getLabel(512938, "导出选中")
+ },
+ ...menus
+ ];
+ break;
+ default:
+ break;
+ }
+ }
+ return menus;
+};
+export const renderReqBtns = (selectedKey, getLabel, onOpenAdvanceSearch, onAdvanceSearch, onImport, showOperateBtn) => {
+ let reqBtns = showOperateBtn ? [
+ ,
+
+ ] : [];
+ if (showOperateBtn) {
+ switch (selectedKey) {
+ case "1":
+ reqBtns.unshift(
+ {getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")}
+
+ }
+ />);
+ break;
+ case "3":
+ reqBtns.shift();
+ reqBtns.unshift();
+ break;
+ case "4,5":
+ reqBtns.shift();
+ reqBtns.unshift();
+ break;
+ default:
+ break;
+ }
+ }
+ return reqBtns;
+};
+export const logConditions = [
+ {
+ items: [
+ {
+ colSpan: 1,
+ conditionType: "BROWSER",
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ linkUrl: "/hrm/resource/HrmResource.jsp?id=",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "1"
+ },
+ domkey: ["employeeId"],
+ fieldcol: 17,
+ label: "对象",
+ lanId: 106,
+ labelcol: 7,
+ value: ""
+ },
+ {
+ colSpan: 1,
+ conditionType: "BROWSER",
+ browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: true,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: true,
+ linkUrl: "/hrm/resource/HrmResource.jsp?id=",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: "1"
+ },
+ domkey: ["operator"],
+ fieldcol: 17,
+ label: "操作人",
+ lanId: 111,
+ labelcol: 7,
+ value: ""
+ }
+ ],
+ defaultshow: true
+ }
+];
+export const getLogSearchsForm = (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: (
+
+
+ {
+ getKey(fields) === "operator" &&
+
+ }
+ ),
+ colSpan: 1
+ });
+ });
+ group.push(
+ );
+ });
+ 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
+ }
+ ]
+ },
+ {
+ 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", typename: "SOCIAL_SECURITY",
+ col: 2, showPaid: true,
+ items: [
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["socialSchemeId"],
+ fieldcol: 14,
+ label: "社保方案名称",
+ lanId: 111,
+ labelcol: 10,
+ value: "",
+ options: [],
+ viewAttr: 2
+ },
+ {
+ colSpan: 3,
+ conditionType: "SELECT",
+ domkey: ["socialUnderTake"],
+ 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
+ }
+ ]
+ },
+ {
+ 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, 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 onNoPaymentChange(type, v)}
+ disabled={runStatuses === "4,5"}
+ />;
+ };
+ const { socialBase, fundBase, otherBase, runStatuses } = extraFormField;
+ 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
+ });
+ });
+ !_.isEmpty(items) && group.push(
+ : }
+ className={c.col === 3 ? "basic-welfare-info-wrapper" : (c.col === 2 || c.items.length > 1) ? "twoColumns-welfare-info-wrapper" : ""}
+ />);
+ });
+ return _.reduce(group, (pre, cur) => {
+ if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
+ if (!_.isNil(socialBase.comItems) && _.every(socialBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
+ } else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
+ if (!_.isNil(fundBase.comItems) && _.every(fundBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
+ } else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
+ if (!_.isNil(otherBase.comItems) && _.every(otherBase.comItems, o => o.items.length > 0)) {
+ return [
+ ...pre, cur,
+ ({ ...o, title: `${o.title}(${getLabel(500201, "个人")})` }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>,
+ ({
+ ...o, title: `${o.title}(${getLabel(1851, "公司")})`,
+ items: _.map(o.items, g => ({ ...g, domkey: [`${getKey(g)}_com`] }))
+ }))}
+ value={payload} onChange={onExtraChange} onSameChange={onSameChange} runStatuses={runStatuses}/>
+ ];
+ } else {
+ return [...pre, cur,
+ ];
+ }
+ }
+ return [...pre, cur];
+ }, []);
+};
+
+const BenefitBaseComponent = (props) => {
+ const { dataSource, value, onChange, onSameChange, runStatuses } = props;
+ return
+ {
+ _.map(dataSource, item => {
+ const { title, items } = item;
+ return ({
+ com:
+ onChange(getKey(child), v)}
+ viewAttr={runStatuses === "4,5" ? 1 : 2}
+ />
+
+ }))}
+ customComponent={
+ {getLabel(543195, "各项福利基数一致")}
+ onSameChange(items, v)}
+ disabled={runStatuses === "4,5"}/>
+
}
+ title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
+ />;
+ })
+ }
+ ;
+};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
new file mode 100644
index 00000000..f0b9ba9f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
@@ -0,0 +1,185 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利档案页面重构
+ * Description:
+ * Date: 2023/10/31
+ */
+import React, { Component } from "react";
+import { WeaLoadingGlobal, WeaLocaleProvider, WeaReqTop, WeaTab } from "ecCom";
+import { message } from "antd";
+import { inject, observer } from "mobx-react";
+import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel";
+import WelfareTableList from "./components/welfareTableList";
+import WelfareArchivesImportDialog from "./components/welfareArchivesImportDialog";
+import WelfareTip from "./components/welfareTip";
+import LogDialog from "./components/logDialog";
+import * as API from "../../../apis/welfareArchive";
+import { sysinfo } from "../../../apis/ruleconfig";
+import { optTypeEnum, renderDropMenuDatas, renderReqBtns, tabList, welfareTipList } from "./config";
+import { convertToUrlString } from "../../../util/url";
+import cs from "classnames";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const APILIST = {
+ fullStaffIncrease: API.allStayAddToPay,
+ fullReduction: API.allStayDelToStop
+};
+
+@inject("taxAgentStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedKey: "1", showSearchAd: false, isQuery: false, logDialogVisible: false,
+ topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 },
+ welfareImpDialog: { visible: false, title: getLabel(24023, "数据导入"), runStatuses: "" },
+ showExtEmpsWitch: false
+ };
+ }
+
+ async componentDidMount() {
+ // extEmpsWitch //非系统人员开关, 1: 开启, 0:关闭
+ const [{ data: { extEmpsWitch } }] = await Promise.all([sysinfo()]);
+ this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
+ }
+
+ queryInsuranceTabTotal = (active, total) => {
+ API.queryInsuranceTabTotal().then(({ status, data }) => {
+ if (status) {
+ const key = _.find(tabList, o => o.viewcondition === active).groupid;
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
+ });
+ }
+ });
+ };
+ handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
+ handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
+ handleImport = () => {
+ this.setState({
+ welfareImpDialog: {
+ ...this.state.welfareImpDialog, visible: true,
+ runStatuses: this.state.selectedKey
+ }
+ });
+ };
+ onDropMenuClick = (key) => {
+ switch (key) {
+ case "fullStaffIncrease":
+ case "fullReduction":
+ this.handleFullOptions(key);
+ break;
+ case "batchStaffIncrease":
+ case "batchDeleteTodolist":
+ case "batchReduction":
+ case "batchCancellationOfSuspended":
+ case "batchDeleteTodolistStayDel":
+ const type = _.find(optTypeEnum, o => o.key === key).type;
+ const payload = _.find(optTypeEnum, o => o.key === key).payload;
+ this.welfareListRef.wrappedInstance.handleBatchOpt(type, payload);
+ break;
+ case "exportAll":
+ case "exportSelected":
+ this.handleExport(key);
+ break;
+ case "log":
+ this.setState({ logDialogVisible: true });
+ break;
+ default:
+ break;
+ }
+ };
+ onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
+ handleFullOptions = (key) => {
+ WeaLoadingGlobal.start();
+ APILIST[key]().then(({ status, data, errormsg }) => {
+ WeaLoadingGlobal.destroy();
+ if (status) {
+ const { type, msg } = data;
+ if (type === "fail") {
+ message.error(msg);
+ } else {
+ message.success(msg);
+ this.onAdSearch();
+ }
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => WeaLoadingGlobal.destroy());
+ };
+ handleExport = (key) => {
+ const {
+ state: { selectedRowKeys },
+ props: { archivesStore: { welfareForm } }
+ } = this.welfareListRef.wrappedInstance,
+ { selectedKey: runStatuses } = this.state;
+ let payload = { runStatuses };
+ if (key.indexOf("Selected") !== -1 && _.isEmpty(selectedRowKeys)) {
+ message.warning(getLabel(543303, "请选择表格数据"));
+ return;
+ }
+ payload = { ...payload, ids: selectedRowKeys.join(",") };
+ key.indexOf("Selected") === -1 && (payload = { ...payload, ids: "", ...welfareForm.getFormParams() });
+ window.open(`/api/bs/hrmsalary/scheme/export?${convertToUrlString(payload)}`, "_blank");
+ };
+
+ render() {
+ const {
+ selectedKey, topTabCount, showSearchAd, isQuery,
+ logDialogVisible, welfareImpDialog, showExtEmpsWitch
+ } = this.state;
+ const { taxAgentStore: { showOperateBtn } } = this.props;
+ const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
+ return (
+
+
}
+ iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
+ dropMenuDatas={renderDropMenuDatas(selectedKey, getLabel, showOperateBtn)}
+ buttons={renderReqBtns(selectedKey, getLabel, this.handleOpenAdvanceSearch, this.handleAdvanceSearch, this.handleImport, showOperateBtn)}
+ replaceTab={
+
this.setState({ selectedKey: key })}
+ />
+ }
+ >
+
+
+ this.setState({ showSearchAd: false })}
+ onAdSearch={this.onAdSearch}
+ />
+
+ {/*列表*/}
+
this.welfareListRef = dom}
+ runStatuses={selectedKey} showOperateBtn={showOperateBtn}
+ onChangeTopTabCount={this.queryInsuranceTabTotal}
+ />
+ {/*提示*/}
+ {!_.isEmpty(tipList) && }
+ {/*操作日志*/}
+ this.setState({ logDialogVisible: false })}/>
+ {/* 导入*/}
+ {
+ this.setState({
+ isQuery: isFresh ? !isQuery : isQuery,
+ welfareImpDialog: {
+ ...this.state.welfareImpDialog, visible: false,
+ runStatuses: ""
+ }
+ });
+ }}/>
+
+
+
+ );
+ }
+}
+
+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..65aaa543
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less
@@ -0,0 +1,216 @@
+.zIndex0-welfare-archive {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+}
+
+.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;
+ display: flex;
+ flex-direction: column;
+
+ .table-layout {
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100%;
+ }
+ }
+
+ .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
+ }
+ }
+
+ }
+ }
+ }
+
+ .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;
+ }
+ }
+ }
+}
+
+.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;
+
+ .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;
+ }
+ }
+ }
+
+ .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;
+
+ .wea-form-item {
+ padding: 5px 16px;
+
+ .wea-form-item-label {
+ color: #666;
+ }
+ }
+ }
+
+ .wea-form-cell-wrapper {
+ background: #FFF;
+ border: 1px solid #e5e5e5;
+ }
+
+ .welfare-same-box {
+ & > span {
+ margin-right: 10px;
+ }
+ }
+ }
+ }
+}
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;
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 096a5ab7..f7a503ad 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -9,10 +9,14 @@ const { TableStore } = WeaTableNew;
export class ArchivesStore {
@observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log
-
-
-
-
+ @observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form
+ @observable welfareProfileForm = new WeaForm(); // 社保福利档案重构-员工薪资档案form
+ @action initWelfareProfileForm = () => {
+ this.hasBeenModify = false;
+ this.welfareProfileForm = new WeaForm();
+ };
+ @observable hasBeenModify = false; //社保福利档案-员工薪资档数据-是否修改过
+ @action setHasBeenModify = (v) => this.hasBeenModify = v;//设置社保福利档案-员工薪资档数据
@observable tableStore = new TableStore(
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 = [];
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index e5b3c1aa..fb48beb1 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) => {