From 817f9767fc904da6e824505aed0dcc15dc686a14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 30 Jan 2024 16:57:21 +0800
Subject: [PATCH 1/9] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?=
=?UTF-8?q?=E5=8D=95=E9=85=8D=E7=BD=AE=E5=8F=8D=E9=A6=88=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/mobilePayroll/index.js | 26 ++++++++-----------
.../hrmSalary/pages/mySalary/mySalaryView.js | 22 +++++++++-------
.../pages/payroll/templateBaseSettings.js | 18 +++++++++++--
.../payrollRelease/components/conditions.js | 11 ++++++++
.../components/payrollTempBaseSet/index.js | 19 +++++++++-----
.../updatePayrollTemplateSlide/index.js | 3 ++-
6 files changed, 66 insertions(+), 33 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index 98912d8a..d53d8fc7 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -201,7 +201,7 @@ export default class MobilePayroll extends React.Component {
;
const {
salaryTemplate, salaryGroups, employeeInformation,
- sendTime, confirmStatus
+ sendTime, confirmStatus, showAck, showFeedback
} = toJS(this.props.mySalaryStore.mySalaryBill);
const salaryProps = {
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
@@ -215,13 +215,11 @@ export default class MobilePayroll extends React.Component {
- {
- (_.isNil(confirmStatus) || confirmStatus === "0") &&
-
- }
+
:
@@ -229,13 +227,11 @@ export default class MobilePayroll extends React.Component {
store={this.props.mySalaryStore}>
- {
- (_.isNil(confirmStatus) || confirmStatus === "0") &&
-
- }
+
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index 0ddd835d..5fa76f93 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -96,13 +96,11 @@ class MySalaryView extends Component {
store={this.props.mySalaryStore}>
- {
- (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
-
- }
+
@@ -120,7 +118,13 @@ export default MySalaryView;
export const ConfirmBtns = (props) => {
return
-
-
+ {
+ props.showAck === "1" &&
+
+ }
+ {
+ props.showFeedback === "1" &&
+
+ }
;
};
diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
index f64ad003..d8a1eeb2 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
@@ -34,6 +34,7 @@ class TemplateBaseSettings extends Component {
},
ackFeedbackSetting: {
ackStatus: "0",
+ feedbackStatus: "0",
autoAckDays: 7,
feedBackUrl: "",
mobileFeedbackUrl: ""
@@ -97,7 +98,7 @@ class TemplateBaseSettings extends Component {
render() {
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
- const { ackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
+ const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
const { limitMonth = 0 } = salaryBillViewingLimitSetting;
return (
@@ -156,9 +157,22 @@ class TemplateBaseSettings extends Component {
})}/>
+
+ }
+
+ this.setState({
+ ackFeedbackSetting: {
+ ...ackFeedbackSetting, feedbackStatus
+ }
+ })}/>
+
+ {
+ feedbackStatus === "1" &&
+
{
- if (it === "ackFeedbackStatus") {
+ if (it === "ackFeedbackStatus" || it === "feedbackStatus") {
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
} else {
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
@@ -292,15 +292,19 @@ class Index extends Component {
handleFbChange = (params) => {
const { payrollStore: { payrollTempFeedbackForm, setHasBeenModify } } = this.props;
const key = _.keys(params)[0];
- if (key === "ackFeedbackStatus") {
+ if (key === "ackFeedbackStatus" || key === "feedbackStatus") {
this.setState({
fbConditions: _.map(this.state.fbConditions, it => {
if (it.title === getLabel(544092, "工资单确认反馈设置")) {
return {
...it, items: _.map(it.items, o => {
- if (getKey(o) === "autoAckDays" || getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
+ if (getKey(o) === "autoAckDays") {
return {
- ...o, hide: params[key].value === "0"
+ ...o, hide: key === "ackFeedbackStatus" && params["ackFeedbackStatus"].value === "0"
+ };
+ } else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
+ return {
+ ...o, hide: key === "feedbackStatus" && params["feedbackStatus"].value === "0"
};
}
return { ...o };
@@ -312,8 +316,11 @@ class Index extends Component {
}, () => {
payrollTempFeedbackForm.initFormFields(this.state.fbConditions);
const ackFeedbackStatus = payrollTempFeedbackForm.getFormParams().ackFeedbackStatus;
+ const feedbackStatus = payrollTempFeedbackForm.getFormParams().feedbackStatus;
if (ackFeedbackStatus === "0") payrollTempFeedbackForm.updateFields({
- autoAckDays: "7",
+ autoAckDays: "7"
+ });
+ if (feedbackStatus === "0") payrollTempFeedbackForm.updateFields({
feedbackUrl: "/",
mobileFeedbackUrl: "/"
});
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
index ac2cb87c..9b0a1c53 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/updatePayrollTemplateSlide/index.js
@@ -46,11 +46,12 @@ class Index extends Component {
const {
replenishRule, autoSendStatus, emailStatus, msgStatus, smsStatus, ...extraBs
} = payrollTempForm.getFormParams(),
- { ackFeedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
+ { ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
const payload = {
...toJS(tmplDataSource), ...extraFb, ...formData, ...extraBs,
ackFeedbackStatus: ackFeedbackStatus === "1",
+ feedbackStatus: feedbackStatus === "1",
autoSendStatus: autoSendStatus === "1",
emailStatus: emailStatus === "1",
msgStatus: msgStatus === "1",
From d866cc07cf16744644f83b1a6e1c75bbbf95c7a2 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, 2 Feb 2024 16:09:03 +0800
Subject: [PATCH 2/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/index.js | 4 +-
.../welfarePlan/config.js | 44 +++++++++++
.../welfarePlan/index.js | 77 +++++++++++++++++++
.../welfarePlan/index.less | 72 +++++++++++++++++
pc4mobx/hrmSalary/stores/programme.js | 2 +
5 files changed, 198 insertions(+), 1 deletion(-)
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 799df79c..e40f42e2 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -5,7 +5,8 @@ import HistoricalPayroll from "./pages/historicalPayroll";
import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords";
import MySalaryMobile from "./pages/mySalaryMobile";
import MySalary from "./pages/mySalaryBenefits";
-import Programme from "./pages/socialSecurityBenefits/programme";
+import Programme from "./pages/socialSecurityBenefits/welfarePlan";
+import Programme_old from "./pages/socialSecurityBenefits/programme";
// import Archivess from "./pages/socialSecurityBenefits/archives";
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
@@ -128,6 +129,7 @@ const Routes = (
path="socialSecurityBenefits"
component={SocialSecurityBenefits}>
+
{/**/}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
new file mode 100644
index 00000000..c2155dbf
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
@@ -0,0 +1,44 @@
+import React from "react";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button } from "antd";
+import AdvanceInputBtn from "../welfareArchive/components/advanceInputBtn";
+import { CancelHelpfulDiv, HelpfulDiv } from "../welfareArchive/components/welfareTip";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+export const tabWelfarePlanList = [
+ { key: "SOCIAL_SECURITY", title: getLabel(538967, "社保") },
+ { key: "ACCUMULATION_FUND", title: getLabel(538969, "公积金") },
+ { key: "OTHER", title: getLabel(542717, "企业年金及其他福利") },
+ { key: "CUSTOM", title: getLabel(543151, "自定义福利") }
+];
+/*
+ * Author: 黎永顺
+ * Description: 社保福利方案-头部操作
+ * Params:
+ * Date: 2024/2/2
+ */
+export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
+ return [{
+ key: "log",
+ icon: ,
+ content: getLabel(545781, "操作日志")
+ }];
+};
+export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn) => {
+ let reqBtns = showOperateBtn ? [
+ ,
+ onSalaryOpts("OPEN")} onAdvanceSearch={()=>onSalaryOpts("SEARCH")}/>
+ ] : [onSalaryOpts("OPEN")} onAdvanceSearch={()=>onSalaryOpts("SEARCH")}/>];
+ if (showOperateBtn) {
+ switch (selectedKey) {
+ case "CUSTOM":
+ break;
+ default:
+ break;
+ }
+ }
+ return reqBtns;
+};
+
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
new file mode 100644
index 00000000..3fbf52c5
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -0,0 +1,77 @@
+/*
+ * Author: 黎永顺
+ * name: 福利方案页面重构
+ * Description:
+ * Date: 2024/2/2
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaReqTop } from "ecCom";
+import { renderDropMenuDatas, renderReqBtns, tabWelfarePlanList } from "./config";
+import LogDialog from "../../../components/logViewModal";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("taxAgentStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ selectedKey: "SOCIAL_SECURITY", 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
+ };
+ }
+
+ handleReqBtnsCLick = (type, importType) => {
+ const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
+ switch (type) {
+ case "ADD":
+ break;
+ case "OPEN":
+ this.handleOpenAdvanceSearch();
+ break;
+ case "SEARCH":
+ this.handleAdvanceSearch();
+ break;
+ default:
+ break;
+ }
+ };
+ handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
+ handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
+ onDropMenuClick = (key) => {
+ switch (key) {
+ case "log":
+ this.setState({ logDialogVisible: true });
+ break;
+ default:
+ break;
+ }
+ };
+
+ render() {
+ const { taxAgentStore: { showOperateBtn }, logDialogVisible } = this.props;
+ return (
+
+
}
+ iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
+ onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList}
+ buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn)}
+ >
+
+
+ {/*操作日志*/}
+
this.setState({ logDialogVisible: false })}/>
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
new file mode 100644
index 00000000..e52aee71
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -0,0 +1,72 @@
+//社保福利方案页面重构
+.salary-welfare-plan-wrapper {
+ 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-plan-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: 246px;
+ overflow: hidden auto;
+
+ .formItem-delete {
+ position: absolute;
+ top: 0;
+ right: -40px;
+ }
+
+ .searchAdvanced-commonSelect {
+ border-top: 1px solid #ebebeb;
+ margin: 0 25px;
+ padding: 10px 0;
+ }
+
+ .custom-advance-largeSpacing {
+ padding-left: 26px;
+
+ .link {
+ border: none;
+ border-radius: 0;
+ padding: 12px 10px 12px 26px;
+ color: #2db7f5
+ }
+ }
+
+ }
+ }
+ }
+}
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index 1459cc09..b3e481ce 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -10,6 +10,8 @@ const { TableStore } = WeaTableNew;
export class ProgrammeStore {
//lys-表单初始化(方案查询表单)
@observable planSearchForm = new WeaForm();
+ @observable planForm = new WeaForm(); //社保方案-新增编辑Form
+ @action initPlanForm = () => this.planForm = new WeaForm();//社保方案-初始化新增编辑Form
@observable tableStore = new TableStore(); // new table
From 8ed92e793d73764cd690c25d2b63a2320ea12e9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sun, 4 Feb 2024 17:04:05 +0800
Subject: [PATCH 3/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/advanceInputBtn/index.js | 33 +++
.../components/advanceInputBtn/index.less | 29 ++
.../welfarePlanAdvanceSearchPannel/index.js | 51 ++++
.../components/welfarePlanCopyDialog/index.js | 68 +++++
.../welfarePlanCustomDialog/index.js | 91 ++++++
.../components/welfarePlanList/index.js | 262 ++++++++++++++++++
.../welfarePlan/config.js | 180 +++++++++++-
.../welfarePlan/index.js | 32 ++-
.../welfarePlan/index.less | 65 ++++-
pc4mobx/hrmSalary/stores/programme.js | 8 +-
pc4mobx/hrmSalary/style/index.less | 43 ++-
11 files changed, 828 insertions(+), 34 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.less
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.js
new file mode 100644
index 00000000..e78bba6f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.js
@@ -0,0 +1,33 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利方案页面重构-高级搜索
+ * Description:
+ * Date: 2024/2/2
+ */
+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("programmeStore")
+@observer
+class Index extends Component {
+ render() {
+ const { programmeStore: { planSearchForm } } = this.props;
+ return (
+
+ planSearchForm.updateFields({ schemeName: v })}
+ onSearch={this.props.onAdvanceSearch}
+ />
+
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/advanceInputBtn/index.less
new file mode 100644
index 00000000..9081d39f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/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/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
new file mode 100644
index 00000000..0ea2dcc2
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
@@ -0,0 +1,51 @@
+/*
+ * Author: 黎永顺
+ * name:社保福利方案页面重构-高级搜索面板
+ * Description:
+ * Date: 2024/2/2
+ */
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import { Button } from "antd";
+import { inject, observer } from "mobx-react";
+import { getSearchs } from "../../../../../util";
+import { searchConditons } from "../../config";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("programmeStore")
+@observer
+class WelfarePlanAdvanceSearchPannel extends Component {
+
+ componentDidMount() {
+ const { programmeStore: { planSearchForm } } = this.props;
+ planSearchForm.initFormFields(searchConditons);
+ }
+
+ render() {
+ const { programmeStore: { planSearchForm } } = this.props;
+ return (
+
+
+ {getSearchs(planSearchForm, searchConditons, 2, false)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default WelfarePlanAdvanceSearchPannel;
+
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
new file mode 100644
index 00000000..59af2d46
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
@@ -0,0 +1,68 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利方案重构-复制
+ * Description:
+ * Date: 2024/2/4
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider } from "ecCom";
+import { Button, message } from "antd";
+import * as API from "../../../../../apis/welfareScheme";
+import { getSearchs } from "../../../../../util";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("programmeStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.programmeStore.initPlanCopyForm();
+ }
+
+
+ save = () => {
+ const { programmeStore: { planCopyForm }, copyId: id, selectedKey } = this.props;
+ planCopyForm.validateForm().then(f => {
+ if (f.isValid) {
+ this.setState({ loading: true });
+ API.copyScheme({ id, schemeName: planCopyForm.getFormDatas()[`${selectedKey}_schemeName`].value })
+ .then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onCancel(true);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ render() {
+ const { loading } = this.state;
+ const { programmeStore: { planCopyForm }, conditions } = this.props;
+ return (
+ {getLabel(537558, "保存")}
+ ]}
+ >
+ {getSearchs(planCopyForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
new file mode 100644
index 00000000..8c9d2c7f
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
@@ -0,0 +1,91 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利方案-自定义福利新建编辑
+ * Description:
+ * Date: 2024/2/4
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button, message } from "antd";
+import * as API from "../../../../../apis/welfareScheme";
+import { getSearchs } from "../../../../../util";
+import { customPlanConditons } from "../../config";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("programmeStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, conditions: []
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.getCustomCategoryForm(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.programmeStore.initPlanCustomForm();
+ }
+
+ getCustomCategoryForm = (props) => {
+ API.getCustomCategoryForm({ id: props.customId }).then(({ status, data }) => {
+ if (status) {
+ const { form } = data;
+ this.setState({
+ conditions: customPlanConditons
+ }, () => {
+ const { programmeStore: { planCustomForm } } = props;
+ planCustomForm.initFormFields(this.state.conditions);
+ // planCustomForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
+ });
+ }
+ });
+ };
+
+ save = () => {
+ const { programmeStore: { planCustomForm }, copyId: id, selectedKey } = this.props;
+ planCustomForm.validateForm().then(f => {
+ if (f.isValid) {
+ this.setState({ loading: true });
+ const payload = {
+ ...planCustomForm.getFormParams(),
+ paymentScope: planCustomForm.getFormParams().paymentScope.split(",")
+ };
+ console.log(payload);
+ return;
+ API.copyScheme({ id, schemeName: planCustomForm.getFormDatas()[`${selectedKey}_schemeName`].value })
+ .then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onCancel(true);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ render() {
+ const { loading, conditions } = this.state;
+ const { programmeStore: { planCustomForm } } = this.props;
+ return (
+ {getLabel(537558, "保存")}
+ ]}
+ >
+ {getSearchs(planCustomForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
new file mode 100644
index 00000000..9571e336
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
@@ -0,0 +1,262 @@
+/*
+ * Author: 黎永顺
+ * name: 社保福利方案重构-列表
+ * Description:
+ * Date: 2024/2/2
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider, WeaTable } from "ecCom";
+import { Dropdown, Menu, message, Modal } from "antd";
+import TipLabel from "../../../../../components/TipLabel";
+import WelfarePlanCopyDialog from "../welfarePlanCopyDialog";
+import WelfarePlanCustomDialog from "../welfarePlanCustomDialog";
+import { tabWelfarePlanList, welfarePlanCopyConditions, welfarePlanCustomTipList } from "../../config";
+import * as API from "../../../../../apis/welfareScheme";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const APIFOX = {
+ SOCIAL_SECURITY: API.getTable,
+ ACCUMULATION_FUND: API.getTable,
+ OTHER: API.getTable,
+ CUSTOM: API.getCustomCategoryList
+};
+
+@inject("programmeStore", "taxAgentStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [], columns: [], loading: false,
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ copyDialog: { visible: false, title: "", copyId: "", copyName: "", conditions: [] },
+ customDialog: { visible: false, title: "", customId: "" }
+ };
+ }
+
+ componentDidMount() {
+ this.getList(this.props);
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if ((nextProps.selectedKey !== this.props.selectedKey) || (nextProps.isQuery !== this.props.isQuery)) {
+ this.setState({
+ pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
+ }, () => this.getList(nextProps));
+ }
+ if ((nextProps.selectedKey !== this.props.selectedKey)) {
+ this.setState({
+ dataSource: [], columns: [], loading: false,
+ pageInfo: { current: 1, pageSize: 10, total: 0 },
+ copyDialog: { visible: false, title: "", copyId: "", copyName: "", conditions: [] }
+ });
+ }
+ }
+
+ getList = (props) => {
+ const { programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, custom } = props;
+ const { pageInfo } = this.state;
+ const originPayload = { ...pageInfo, welfareTypeEnum }, customPayload = { welfareTypeEnum: custom },
+ welfarePayload = { ...planSearchForm.getFormParams() };
+ const payload = welfareTypeEnum === "CUSTOM" ? { ...originPayload, ...customPayload } : { ...originPayload, ...welfarePayload };
+ this.setState({ loading: true });
+ APIFOX[welfareTypeEnum](payload).then(({ status, data }) => {
+ this.setState({ loading: false });
+ if (status) {
+ const { list: dataSource, columns, pageNum: current, pageSize, total } = data;
+ this.setState({
+ dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
+ columns: _.map(_.filter(columns, o => (o.dataIndex !== "id" && o.dataIndex !== "paymentArea")), g => {
+ const { dataIndex } = g;
+ let col = { ...g, width: "20%" };
+ switch (dataIndex) {
+ case "schemeName":
+ col = {
+ ...col, width: 250,
+ render: (text, record) => ( this.handleOpts("view", record)}>{text})
+ };
+ break;
+ case "paymentType":
+ col = { ...col, width: 100 };
+ break;
+ case "paymentScope":
+ col = { ...col, width: 300 };
+ break;
+ case "remarks":
+ col = { ...col, width: 200 };
+ break;
+ case "paymentScopt":
+ case "welfareType":
+ col = {
+ ...col, width: "30%",
+ render: (__, record) => ({record[`${dataIndex}Span`] || record["paymentScopeSpan"]})
+ };
+ break;
+ case "isUse":
+ col = {
+ ...col, render: (__, record) => ()
+ };
+ break;
+ default:
+ break;
+ }
+ return col;
+ })
+ });
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+ handleOpts = (key, record = {}) => {
+ const { selectedKey, programmeStore: { planCopyForm } } = this.props;
+ const { id, schemeName } = record;
+ switch (key) {
+ case "edit":
+ break;
+ case "delete":
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(111, "确定删除吗?删除后数据不可找回"),
+ onOk: () => {
+ API.deleteScheme({ welfareTypeEnum: selectedKey, ids: [id] })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ message.success(getLabel(502230, "删除成功!"));
+ this.getList(this.props);
+ } else {
+ message.error(errormsg);
+ }
+ });
+ }
+ });
+ break;
+ case "custom-delete":
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(111, "确定删除吗?删除后数据不可找回"),
+ onOk: () => {
+ WeaLoadingGlobal.start();
+ API.deleteCustomCategory({ id }).then(({ status, errormsg }) => {
+ WeaLoadingGlobal.destroy();
+ if (status) {
+ message.success(getLabel(502230, "删除成功!"));
+ this.getList(this.props);
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => WeaLoadingGlobal.destroy());
+ }
+ });
+ break;
+ case "custom-edit":
+ this.setState({
+ customDialog: {
+ visible: true, customId: id,
+ title: `${id ? getLabel(501169, "编辑") : getLabel(365, "新建")}${getLabel(543151, "自定义福利")}`
+ }
+ });
+ break;
+ case "copy":
+ this.setState({
+ copyDialog: {
+ visible: true, copyId: id, copyName: `${schemeName}-${getLabel(77, "复制")}`,
+ title: `${getLabel(77, "复制")}-${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}`,
+ conditions: welfarePlanCopyConditions[selectedKey]
+ }
+ }, () => {
+ const { copyDialog: { conditions, copyName } } = this.state;
+ planCopyForm.initFormFields(conditions);
+ planCopyForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
+ });
+ break;
+ default:
+ break;
+ }
+ };
+
+ render() {
+ const { dataSource, columns, pageInfo, loading, copyDialog, customDialog } = this.state;
+ const { selectedKey, taxAgentStore: { showOperateBtn } } = this.props;
+ 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.getList(this.props));
+ },
+ onChange: current => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => this.getList(this.props));
+ }
+ };
+ const optCols = selectedKey !== "CUSTOM" ? {
+ title: getLabel(18610, "操作"),
+ dataIndex: "operation", width: 185,
+ render: (__, record) => ()
+ } : {
+ title: getLabel(18610, "操作"),
+ dataIndex: "operation", width: 165,
+ render: (__, record) => ()
+ };
+ return (
+
+
+ {
+ selectedKey === "CUSTOM" &&
+
+ }
+ {/*复制方案*/}
+
this.setState({
+ copyDialog: { ...copyDialog, visible: false, conditions: [] }
+ }, () => isRefrese && this.getList(this.props))}
+ />
+ {/*新建编辑自定义方案*/}
+ this.setState({
+ customDialog: { ...customDialog, visible: false, customId: "" }
+ }, () => isRefrese && this.getList(this.props))}
+ />
+
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
index c2155dbf..d3b64200 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
@@ -1,8 +1,7 @@
import React from "react";
-import { WeaLocaleProvider, WeaTools } from "ecCom";
+import { WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
import { Button } from "antd";
-import AdvanceInputBtn from "../welfareArchive/components/advanceInputBtn";
-import { CancelHelpfulDiv, HelpfulDiv } from "../welfareArchive/components/welfareTip";
+import AdvanceInputBtn from "./components/advanceInputBtn";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -13,6 +12,11 @@ export const tabWelfarePlanList = [
{ key: "OTHER", title: getLabel(542717, "企业年金及其他福利") },
{ key: "CUSTOM", title: getLabel(543151, "自定义福利") }
];
+export const welfarePlanCustomTipList = [
+ getLabel(544345, "1、可以为社保、公积金、企业年金及其他福利新增自定义的福利项,如:残疾保险等"),
+ getLabel(544346, "2、新增自定义福利默认启用,社保福利方案中的自定义福利项均未开启缴纳,当前页面的自定义福利项才可以停用;停用后再新增方案时没有该福利项"),
+ getLabel(544347, "3、自定义福利若要缴纳,需要在方案里填写缴纳相关数据")
+];
/*
* Author: 黎永顺
* Description: 社保福利方案-头部操作
@@ -27,18 +31,166 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
}];
};
export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn) => {
- let reqBtns = showOperateBtn ? [
- ,
- onSalaryOpts("OPEN")} onAdvanceSearch={()=>onSalaryOpts("SEARCH")}/>
- ] : [onSalaryOpts("OPEN")} onAdvanceSearch={()=>onSalaryOpts("SEARCH")}/>];
- if (showOperateBtn) {
- switch (selectedKey) {
- case "CUSTOM":
- break;
- default:
- break;
- }
+ let reqBtns = [
+ ,
+ onSalaryOpts("OPEN")} onAdvanceSearch={() => onSalaryOpts("SEARCH")}/>
+ ];
+ switch (selectedKey) {
+ case "CUSTOM":
+ reqBtns[reqBtns.length - 1] = onSalaryOpts("SEARCH")}
+ options={[
+ { key: "", showname: getLabel(111, "全部"), selected: true },
+ { key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
+ { key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
+ { key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
+ ]}
+ />;
+ break;
+ default:
+ break;
}
+ !showOperateBtn && reqBtns.shift();
return reqBtns;
};
+export const searchConditons = [
+ {
+ items: [
+ {
+ colSpan: 2,
+ conditionType: "INPUT",
+ domkey: ["schemeName"],
+ fieldcol: 16,
+ isQuickSearch: true,
+ label: getLabel(33162, "方案名称"),
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ colSpan: 2,
+ conditionType: "SELECT",
+ domkey: ["paymentTypeEnum"],
+ fieldcol: 16,
+ isQuickSearch: true,
+ label: getLabel(543163, "缴纳类型"),
+ labelcol: 8,
+ value: "",
+ options: [
+ { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
+ { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
+ ],
+ viewAttr: 2
+ }
+ ],
+ title: getLabel(82743, "基础信息"),
+ defaultshow: true
+ }
+];
+export const welfarePlanCopyConditions = {
+ SOCIAL_SECURITY: [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["SOCIAL_SECURITY_schemeName"],
+ fieldcol: 16,
+ label: getLabel(111, "社保名称"),
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ defaultshow: true,
+ title: "",
+ col: 1
+ }
+ ],
+ ACCUMULATION_FUND: [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["ACCUMULATION_FUND_schemeName"],
+ fieldcol: 16,
+ label: getLabel(111, "公积金名称"),
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ defaultshow: true,
+ title: "",
+ col: 1
+ }
+ ],
+ OTHER: [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["OTHER_schemeName"],
+ fieldcol: 16,
+ label: getLabel(111, "企业年金及其他福利名称"),
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ defaultshow: true,
+ title: "",
+ col: 1
+ }
+ ]
+};
+export const customPlanConditons = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["insuranceName"],
+ fieldcol: 14,
+ label: getLabel(111, "福利名称"),
+ labelcol: 8,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["welfareType"],
+ fieldcol: 14,
+ label: getLabel(500401, "类型"),
+ labelcol: 8,
+ options: [
+ { key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
+ { key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
+ { key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
+ ],
+ detailtype: 3,
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["paymentScope"],
+ fieldcol: 16,
+ label: getLabel(543169, "缴纳对象"),
+ labelcol: 8,
+ options: [
+ { key: "SCOPE_COMPANY", showname: getLabel(1851, "公司") },
+ { key: "SCOPE_PERSON", showname: getLabel(500201, "个人") }
+ ],
+ detailtype: 2,
+ rules: "required|string",
+ viewAttr: 3
+ }
+ ],
+ title: "",
+ defaultshow: true
+ }
+];
+
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
index 3fbf52c5..338de3ee 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -8,7 +8,10 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { renderDropMenuDatas, renderReqBtns, tabWelfarePlanList } from "./config";
+import WelfarePlanAdvanceSearchPannel from "./components/welfarePlanAdvanceSearchPannel";
+import WelfarePlanList from "./components/welfarePlanList";
import LogDialog from "../../../components/logViewModal";
+import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -19,17 +22,17 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- selectedKey: "SOCIAL_SECURITY", 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
+ selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, logDialogVisible: false
};
+ this.welfarePlanListRef = null;
}
- handleReqBtnsCLick = (type, importType) => {
- const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
+ handleReqBtnsCLick = (type) => {
+ const { selectedKey } = this.state;
switch (type) {
case "ADD":
+ const { handleOpts } = this.welfarePlanListRef.wrappedInstance || {};
+ selectedKey === "CUSTOM" ? handleOpts("custom-edit") : "";
break;
case "OPEN":
this.handleOpenAdvanceSearch();
@@ -43,6 +46,7 @@ class Index extends Component {
};
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
+ onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
onDropMenuClick = (key) => {
switch (key) {
case "log":
@@ -54,16 +58,28 @@ class Index extends Component {
};
render() {
- const { taxAgentStore: { showOperateBtn }, logDialogVisible } = this.props;
+ const { taxAgentStore: { showOperateBtn } } = this.props;
+ const { logDialogVisible, selectedKey, showSearchAd, isQuery } = this.state;
return (
}
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
- onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList}
+ onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey}
+ onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false })}
buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn)}
>
+
+ this.setState({ showSearchAd: false })}
+ onAdSearch={this.onAdSearch}
+ />
+
+ {/*列表*/}
+
this.welfarePlanListRef = dom}
+ selectedKey={selectedKey} isQuery={isQuery}/>
{/*操作日志*/}
this.planForm = new WeaForm();//社保方案-初始化新增编辑Form
+ @observable planForm = new WeaForm(); //方案-新增编辑Form
+ @action initPlanForm = () => this.planForm = new WeaForm();//方案-初始化新增编辑Form
+ @observable planCopyForm = new WeaForm(); //方案-复制Form
+ @action initPlanCopyForm = () => this.planCopyForm = new WeaForm();//方案-初始化复制Form
+ @observable planCustomForm = new WeaForm(); //方案-新建编辑自定义方案Form
+ @action initPlanCustomForm = () => this.planCustomForm = new WeaForm();//方案-初始化新建编辑自定义方案Form
@observable tableStore = new TableStore(); // new table
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 57689171..0d181610 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -6,7 +6,7 @@
height: 100%;
text-align: center;
- >div {
+ > div {
position: absolute;
top: 50%;
margin-top: -10px;
@@ -31,6 +31,43 @@
}
-.ant-checkbox-wrapper+.ant-checkbox-wrapper {
+.ant-checkbox-wrapper + .ant-checkbox-wrapper {
margin-left: 0 !important;
-}
\ No newline at end of file
+}
+
+//公共彈框表单样式
+.form-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;
+ }
+ }
+ }
+}
From dc624af9bd8091339cb0e92fdc24296ab8b009d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 5 Feb 2024 14:53:38 +0800
Subject: [PATCH 4/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/salaryFilesEditSlide/index.js | 2 +-
.../welfarePlanCustomDialog/index.js | 45 +++--
.../components/welfarePlanEditSlide/index.js | 160 ++++++++++++++++++
.../components/welfarePlanList/index.js | 32 +++-
.../welfarePlan/config.js | 73 +++++++-
.../welfarePlan/index.js | 19 ++-
.../welfarePlan/index.less | 123 ++++++++++++++
pc4mobx/hrmSalary/stores/programme.js | 2 +
8 files changed, 419 insertions(+), 37 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
index 1edd3e56..d4eaf520 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
@@ -212,7 +212,7 @@ class Index extends Component {
{...adjLogRecordDialog}
onCancel={() => this.setState({
adjLogRecordDialog: {
- adjLogRecordDialog, visible: false, title: "", salaryArchiveId: ""
+ ...adjLogRecordDialog, visible: false, title: "", salaryArchiveId: ""
}
})}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
index 8c9d2c7f..00fba733 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
@@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
import { Button, message } from "antd";
import * as API from "../../../../../apis/welfareScheme";
-import { getSearchs } from "../../../../../util";
+import { getConditionDomkeys, getSearchs } from "../../../../../util";
import { customPlanConditons } from "../../config";
const getKey = WeaTools.getKey;
@@ -35,37 +35,48 @@ class Index extends Component {
if (status) {
const { form } = data;
this.setState({
- conditions: customPlanConditons
+ conditions: _.map(customPlanConditons, item => ({
+ ...item, items: _.map(item.items, o => {
+ if (getKey(o) === "welfareType" && props.customId) {
+ return { ...o, viewAttr: 1 };
+ } else {
+ return { ...o };
+ }
+ })
+ }))
}, () => {
const { programmeStore: { planCustomForm } } = props;
planCustomForm.initFormFields(this.state.conditions);
- // planCustomForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
+ _.forEach(getConditionDomkeys(this.state.conditions), k => {
+ if (k === "paymentScope" && props.customId) {
+ planCustomForm.updateFields({ [k]: { value: form[k].join(",") } });
+ } else {
+ planCustomForm.updateFields({ [k]: { value: form[k] || "" } });
+ }
+ });
});
}
});
};
save = () => {
- const { programmeStore: { planCustomForm }, copyId: id, selectedKey } = this.props;
+ const { programmeStore: { planCustomForm }, customId: id, selectedKey } = this.props;
planCustomForm.validateForm().then(f => {
if (f.isValid) {
this.setState({ loading: true });
const payload = {
- ...planCustomForm.getFormParams(),
+ id, ...planCustomForm.getFormParams(),
paymentScope: planCustomForm.getFormParams().paymentScope.split(",")
};
- console.log(payload);
- return;
- API.copyScheme({ id, schemeName: planCustomForm.getFormDatas()[`${selectedKey}_schemeName`].value })
- .then(({ status, errormsg }) => {
- this.setState({ loading: false });
- if (status) {
- message.success(getLabel(30700, "操作成功!"));
- this.props.onCancel(true);
- } else {
- message.error(errormsg);
- }
- });
+ API[!id ? "createSICategory" : "updateCustomCategory"](payload).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onCancel(true);
+ } else {
+ message.error(errormsg);
+ }
+ });
} else {
f.showErrors();
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
new file mode 100644
index 00000000..5522d116
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -0,0 +1,160 @@
+/*
+ * Author: 黎永顺
+ * name:社保方案页面重构-社保方案编辑与查看
+ * Description:
+ * Date: 2024/2/5
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
+import { Button, Modal } from "antd";
+import * as API from "../../../../../apis/welfareScheme";
+import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
+import { getConditionDomkeys, getSearchs } from "../../../../../util";
+import { planConditons } from "../../config";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("programmeStore")
+@observer
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, conditions: []
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ document.querySelector(".salary-welfare-plan-wrapper").classList.add("zIndex0-welfare-plan");
+ const promise = this.getForm(nextProps);
+ } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
+ document.querySelector(".salary-welfare-plan-wrapper").classList.remove("zIndex0-welfare-plan");
+ nextProps.programmeStore.initPlanForm();
+ }
+ }
+
+ getForm = async (props) => {
+ const { data: result } = await getTaxAgentSelectListAsAdmin();
+ const { id, welfareTypeEnum, programmeStore: { planForm } } = props;
+ API.getForm(id ? _.assign({ welfareTypeEnum }, { id }) : { welfareTypeEnum }).then(({ status, data }) => {
+ if (status) {
+ console.log(data, result);
+ const { form: { schemeBatch } } = data;
+ this.setState({
+ conditions: _.map(planConditons, item => ({
+ ...item, items: _.map(item.items, o => {
+ if (getKey(o) === "taxAgentIds") {
+ return {
+ ...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
+ viewAttr: schemeBatch["sharedType"] === "1" ? 3 : 2,
+ options: _.map(result, k => ({ key: k.id, showname: k.content }))
+ };
+ }
+ return o;
+ })
+ }))
+ }, () => {
+ planForm.initFormFields(this.state.conditions);
+ _.map(getConditionDomkeys(this.state.conditions), k => {
+ if (k === "sharedType") {
+ planForm.updateFields({ [k]: schemeBatch[k] || "0" });
+ } else {
+ planForm.updateFields({ [k]: schemeBatch[k] || "" });
+ }
+ });
+ });
+ }
+ });
+ };
+
+ save = async () => {
+ const { programmeStore: { planForm, setHasBeenModify } } = this.props;
+ planForm.validateForm().then(f => {
+ if (f.isValid) {
+ if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
+ planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
+ } else {
+ console.log(planForm.getFormParams());
+ }
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+ renderTitle = () => {
+ const { loading } = this.state, { title, showOperateBtn } = this.props;
+ return
+
+
+ {
+ showOperateBtn &&
+
+ }
+
+
;
+ };
+ handleClose = (visible = false) => {
+ const { programmeStore: { hasBeenModify, setHasBeenModify }, onClose } = this.props;
+ if (hasBeenModify) {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(545770, "确定放弃填写吗?放弃后数据将不会被保存!"),
+ onOk: () => {
+ onClose(visible);
+ setHasBeenModify(false);
+ }
+ });
+ } else {
+ onClose(visible);
+ setHasBeenModify(false);
+ }
+ };
+ onChange = (params) => {
+ const { programmeStore: { planForm, setHasBeenModify } } = this.props;
+ const key = _.keys(params)[0];
+ if (key === "sharedType") {
+ this.setState({
+ conditions: _.map(this.state.conditions, it => ({
+ ...it, items: _.map(it.items, o => {
+ if (getKey(o) === "taxAgentIds") {
+ return {
+ ...o, hide: params[key].value === "0",
+ rules: params[key].value === "1" ? "required|string" : "",
+ viewAttr: params[key].value === "1" ? 3 : 2
+ };
+ }
+ return { ...o };
+ })
+ }))
+ }, () => {
+ planForm.updateFields({ taxAgentIds: "" });
+ });
+ }
+ setHasBeenModify(true);
+ };
+
+ render() {
+ const { conditions } = this.state;
+ const {
+ programmeStore: { planForm, setHasBeenModify }, showOperateBtn, visible
+ } = this.props;
+ return (
+ this.handleClose(false)}
+ content={
+ {getSearchs(planForm, conditions, 1, false, this.onChange)}
+
}
+ />
+ );
+ }
+}
+
+export default Index;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
index 9571e336..f6af25b1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
@@ -11,6 +11,7 @@ import { Dropdown, Menu, message, Modal } from "antd";
import TipLabel from "../../../../../components/TipLabel";
import WelfarePlanCopyDialog from "../welfarePlanCopyDialog";
import WelfarePlanCustomDialog from "../welfarePlanCustomDialog";
+import WelfarePlanEditSlide from "../welfarePlanEditSlide";
import { tabWelfarePlanList, welfarePlanCopyConditions, welfarePlanCustomTipList } from "../../config";
import * as API from "../../../../../apis/welfareScheme";
@@ -31,7 +32,8 @@ class Index extends Component {
dataSource: [], columns: [], loading: false,
pageInfo: { current: 1, pageSize: 10, total: 0 },
copyDialog: { visible: false, title: "", copyId: "", copyName: "", conditions: [] },
- customDialog: { visible: false, title: "", customId: "" }
+ customDialog: { visible: false, title: "", customId: "" },
+ welfarePlanEditSlide: { visible: false, id: "", welfareTypeEnum: "", title: "" }
};
}
@@ -55,9 +57,9 @@ class Index extends Component {
}
getList = (props) => {
- const { programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, custom } = props;
+ const { programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, customQuery } = props;
const { pageInfo } = this.state;
- const originPayload = { ...pageInfo, welfareTypeEnum }, customPayload = { welfareTypeEnum: custom },
+ const originPayload = { ...pageInfo, welfareTypeEnum }, customPayload = { welfareTypeEnum: customQuery },
welfarePayload = { ...planSearchForm.getFormParams() };
const payload = welfareTypeEnum === "CUSTOM" ? { ...originPayload, ...customPayload } : { ...originPayload, ...welfarePayload };
this.setState({ loading: true });
@@ -75,23 +77,25 @@ class Index extends Component {
col = {
...col, width: 250,
render: (text, record) => ( this.handleOpts("view", record)}>{text})
+ onClick={() => this.handleOpts("edit", record)}>{text})
};
break;
case "paymentType":
col = { ...col, width: 100 };
break;
case "paymentScope":
- col = { ...col, width: 300 };
+ col = welfareTypeEnum !== "CUSTOM" ? { ...col, width: 300 } : {
+ ...col, width: "30%",
+ render: (__, record) => ({record[`${dataIndex}Span`]})
+ };
break;
case "remarks":
col = { ...col, width: 200 };
break;
- case "paymentScopt":
case "welfareType":
col = {
...col, width: "30%",
- render: (__, record) => ({record[`${dataIndex}Span`] || record["paymentScopeSpan"]})
+ render: (__, record) => ({record[`${dataIndex}Span`]})
};
break;
case "isUse":
@@ -113,6 +117,12 @@ class Index extends Component {
const { id, schemeName } = record;
switch (key) {
case "edit":
+ this.setState({
+ welfarePlanEditSlide: {
+ visible: true, id, welfareTypeEnum: selectedKey,
+ title: `${id ? getLabel(501169, "编辑") : getLabel(365, "新建")}${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}${getLabel(111, "方案")}`
+ }
+ });
break;
case "delete":
Modal.confirm({
@@ -176,7 +186,7 @@ class Index extends Component {
};
render() {
- const { dataSource, columns, pageInfo, loading, copyDialog, customDialog } = this.state;
+ const { dataSource, columns, pageInfo, loading, copyDialog, customDialog, welfarePlanEditSlide } = this.state;
const { selectedKey, taxAgentStore: { showOperateBtn } } = this.props;
const pagination = {
...pageInfo,
@@ -254,6 +264,12 @@ class Index extends Component {
customDialog: { ...customDialog, visible: false, customId: "" }
}, () => isRefrese && this.getList(this.props))}
/>
+ {/*新建编辑方案*/}
+ this.setState({
+ welfarePlanEditSlide: { ...welfarePlanEditSlide, visible: isFresh }
+ }, () => isFresh && this.getList(this.props))}
+ />
);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
index d3b64200..acff5efa 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/config.js
@@ -30,14 +30,15 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
content: getLabel(545781, "操作日志")
}];
};
-export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn) => {
+export const renderReqBtns = (selectedKey, onSalaryOpts, showOperateBtn, customQuery) => {
let reqBtns = [
,
onSalaryOpts("OPEN")} onAdvanceSearch={() => onSalaryOpts("SEARCH")}/>
];
switch (selectedKey) {
case "CUSTOM":
- reqBtns[reqBtns.length - 1] = onSalaryOpts("SEARCH")}
+ reqBtns[reqBtns.length - 1] = onSalaryOpts("SEARCH", v)}
+ value={customQuery}
options={[
{ key: "", showname: getLabel(111, "全部"), selected: true },
{ key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
@@ -145,6 +146,73 @@ export const welfarePlanCopyConditions = {
}
]
};
+export const planConditons = [
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["paymentType"],
+ fieldcol: 14,
+ label: getLabel(543163, "缴纳类型"),
+ labelcol: 6,
+ options: [
+ { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
+ { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
+ ],
+ value: "SCHEME_TOWN",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["schemeName"],
+ fieldcol: 14,
+ label: getLabel(33162, "方案名称"),
+ labelcol: 6,
+ value: "",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["sharedType"],
+ fieldcol: 14,
+ label: getLabel(543164, "可见性"),
+ labelcol: 6,
+ options: [
+ { key: "0", showname: getLabel(111, "公共") },
+ { key: "1", showname: getLabel(111, "私有") }
+ ],
+ value: "0",
+ rules: "required|string",
+ viewAttr: 3
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["taxAgentIds"],
+ fieldcol: 14,
+ label: getLabel(543165, "可见性范围"),
+ labelcol: 6,
+ multiple: true,
+ options: [],
+ value: "",
+ hide: true,
+ viewAttr: 2
+ },
+ {
+ conditionType: "TEXTAREA",
+ domkey: ["remarks"],
+ fieldcol: 14,
+ label: getLabel(536726, "备注"),
+ labelcol: 6,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ title: getLabel(82743, "基础信息"),
+ defaultshow: true
+ }
+];
export const customPlanConditons = [
{
items: [
@@ -169,6 +237,7 @@ export const customPlanConditons = [
{ key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
{ key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
],
+ value: "SOCIAL_SECURITY",
detailtype: 3,
rules: "required|string",
viewAttr: 3
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
index 338de3ee..50ddb40b 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -22,30 +22,31 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, logDialogVisible: false
+ selectedKey: "SOCIAL_SECURITY", showSearchAd: false, isQuery: false, logDialogVisible: false,
+ customQuery: ""
};
this.welfarePlanListRef = null;
}
- handleReqBtnsCLick = (type) => {
+ handleReqBtnsCLick = (type, value) => {
const { selectedKey } = this.state;
switch (type) {
case "ADD":
const { handleOpts } = this.welfarePlanListRef.wrappedInstance || {};
- selectedKey === "CUSTOM" ? handleOpts("custom-edit") : "";
+ handleOpts(selectedKey === "CUSTOM" ? "custom-edit" : "edit");
break;
case "OPEN":
this.handleOpenAdvanceSearch();
break;
case "SEARCH":
- this.handleAdvanceSearch();
+ this.handleAdvanceSearch(value);
break;
default:
break;
}
};
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
- handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
+ handleAdvanceSearch = (customQuery = "") => this.setState({ isQuery: !this.state.isQuery, customQuery });
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
onDropMenuClick = (key) => {
switch (key) {
@@ -59,15 +60,15 @@ class Index extends Component {
render() {
const { taxAgentStore: { showOperateBtn } } = this.props;
- const { logDialogVisible, selectedKey, showSearchAd, isQuery } = this.state;
+ const { logDialogVisible, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
return (
}
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey}
- onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false })}
- buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn)}
+ onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false, customQuery: "" })}
+ buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn, customQuery)}
>
{/*列表*/}
-
this.welfarePlanListRef = dom}
+ this.welfarePlanListRef = dom} customQuery={customQuery}
selectedKey={selectedKey} isQuery={isQuery}/>
{/*操作日志*/}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index 0e53feaf..59f41a5d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -102,6 +102,129 @@
}
}
+.welfare-plan-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;
+
+ button:last-child {
+ margin-left: 10px;
+ }
+ }
+ }
+
+ .wea-slide-modal-title {
+ border-bottom: 1px solid #e5e5e5 !important;
+ }
+
+ .wea-slide-modal-content {
+ height: 100%;
+
+ .welfare-plan-edit-area {
+ background: #f6f6f6;
+ height: 100%;
+ overflow-y: auto;
+ padding: 16px;
+
+ .wea-search-group, .wea-form-cell {
+ padding: 0;
+
+ .wea-form-item {
+ padding: 5px 16px;
+
+ .wea-form-item-label {
+ color: #666;
+ }
+ }
+ }
+
+ .wea-form-cell-wrapper {
+ background: #FFF;
+ border: 1px solid #e5e5e5;
+
+ .wea-form-cell:not(:last-child) {
+ border-bottom: 1px solid #e5e5e5;
+ }
+ }
+
+ .wea-select, .ant-select, .ant-select-selection {
+ width: 100%;
+ }
+
+ .wea-select .wea-select-input .arrow {
+ position: absolute;
+ right: 4px;
+ top: 8px;
+ color: #666;
+ }
+
+ .wea-select .wdb {
+ word-break: break-all !important;
+ word-wrap: break-word !important;
+ }
+
+ .wea-select .wea-select-input {
+ height: 30px;
+ white-space: nowrap;
+ min-width: 100px;
+ max-width: 426.16px;
+ width: 100%;
+ display: inline-block;
+ padding: 4px 17px 4px 4px;
+ position: relative;
+ min-height: 30px;
+ border: 1px solid #d9d9d9;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
+ }
+}
+
+.zIndex0-welfare-plan {
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+}
+
@media screen and (min-width: 1440px) {
.salary-welfare-plan-content {
.welfare-plan-adapt {
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index ec776699..b8f15b5e 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -16,6 +16,8 @@ export class ProgrammeStore {
@action initPlanCopyForm = () => this.planCopyForm = new WeaForm();//方案-初始化复制Form
@observable planCustomForm = new WeaForm(); //方案-新建编辑自定义方案Form
@action initPlanCustomForm = () => this.planCustomForm = new WeaForm();//方案-初始化新建编辑自定义方案Form
+ @observable hasBeenModify = false; //社保福利方案-员工薪资档数据-是否修改过
+ @action setHasBeenModify = (v) => this.hasBeenModify = v;//设置社保福利方案-员工薪资档数据
@observable tableStore = new TableStore(); // new table
From 4be5c373ec2101e4ac360ac1f48973f305e5a91d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 6 Feb 2024 16:56:10 +0800
Subject: [PATCH 5/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../programme/paymentPeriodModal.js | 4 +-
.../welfarePlanCustomDialog/index.js | 8 +-
.../components/welfarePlanEditSlide/index.js | 79 +++-
.../welfarePlanEditSlide/planSetTable.js | 337 ++++++++++++++++++
.../components/welfarePlanList/index.js | 46 ++-
.../welfarePlan/index.less | 16 +
6 files changed, 464 insertions(+), 26 deletions(-)
create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js
index 6621acd5..a78983d5 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/paymentPeriodModal.js
@@ -61,7 +61,9 @@ class PaymentPeriodModal extends Component {
const { monthList, allSelect } = this.state;
const buttons = [
,
-
+
];
const options = [
{ label: "一月", value: "1" },
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
index 00fba733..bce632b6 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
@@ -40,7 +40,7 @@ class Index extends Component {
if (getKey(o) === "welfareType" && props.customId) {
return { ...o, viewAttr: 1 };
} else {
- return { ...o };
+ return { ...o, viewAttr: props.showOperateBtn ? o.viewAttr : 1 };
}
})
}))
@@ -85,13 +85,13 @@ class Index extends Component {
render() {
const { loading, conditions } = this.state;
- const { programmeStore: { planCustomForm } } = this.props;
+ const { programmeStore: { planCustomForm }, showOperateBtn } = this.props;
return (
{getLabel(537558, "保存")}
- ]}
+ ] : []}
>
{getSearchs(planCustomForm, conditions, 1, false)}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index 5522d116..2b5168d1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -6,8 +6,9 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
-import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
-import { Button, Modal } from "antd";
+import { WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTab, WeaTools } from "ecCom";
+import PlanSetTable from "./planSetTable";
+import { Button, message, Modal } from "antd";
import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
@@ -22,7 +23,7 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, conditions: []
+ loading: false, conditions: [], selectedKey: "2", planDatas: []
};
}
@@ -33,27 +34,28 @@ class Index extends Component {
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
document.querySelector(".salary-welfare-plan-wrapper").classList.remove("zIndex0-welfare-plan");
nextProps.programmeStore.initPlanForm();
+ this.setState({ loading: false, conditions: [], selectedKey: "2", planDatas: [] });
}
}
getForm = async (props) => {
const { data: result } = await getTaxAgentSelectListAsAdmin();
- const { id, welfareTypeEnum, programmeStore: { planForm } } = props;
+ const { id, welfareTypeEnum, programmeStore: { planForm }, showOperateBtn } = props;
API.getForm(id ? _.assign({ welfareTypeEnum }, { id }) : { welfareTypeEnum }).then(({ status, data }) => {
if (status) {
- console.log(data, result);
- const { form: { schemeBatch } } = data;
+ const { form: { schemeBatch, schemeDetailList } } = data;
this.setState({
+ planDatas: schemeDetailList,
conditions: _.map(planConditons, item => ({
...item, items: _.map(item.items, o => {
if (getKey(o) === "taxAgentIds") {
return {
...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
- viewAttr: schemeBatch["sharedType"] === "1" ? 3 : 2,
+ viewAttr: schemeBatch["sharedType"] === "1" ? 3 : showOperateBtn ? o.viewAttr : 1,
options: _.map(result, k => ({ key: k.id, showname: k.content }))
};
}
- return o;
+ return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1 };
})
}))
}, () => {
@@ -69,15 +71,32 @@ class Index extends Component {
}
});
};
-
save = async () => {
- const { programmeStore: { planForm, setHasBeenModify } } = this.props;
+ const { programmeStore: { planForm, setHasBeenModify }, welfareTypeEnum, id } = this.props;
planForm.validateForm().then(f => {
if (f.isValid) {
if (planForm.getFormParams().sharedType === "1" && _.isEmpty(planForm.getFormParams().taxAgentIds)) {
planForm.showError("taxAgentIds", getLabel(111, "\"可见范围\"未填写"));
} else {
- console.log(planForm.getFormParams());
+ const { planDatas } = this.state;
+ const payload = {
+ insuranceScheme: {
+ ...planForm.getFormParams(), welfareTypeEnum, id,
+ paymentArea: planForm.getFormParams().paymentType
+ },
+ insuranceSchemeDetailList: planDatas
+ };
+ this.setState({ loading: true });
+ API[id ? "updateScheme" : "createScheme"](payload).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(30700, "操作成功!"));
+ setHasBeenModify(false);
+ this.props.onClose(true);
+ } else {
+ message.error(errormsg);
+ }
+ }).catch(() => this.setState({ loading: false }));
}
} else {
f.showErrors();
@@ -138,19 +157,47 @@ class Index extends Component {
}
setHasBeenModify(true);
};
+ renderTab = () => {
+ const { selectedKey } = this.state;
+ return this.setState({ selectedKey: v })}
+ />;
+ };
+ handleSetPlanDatas = (datas) => {
+ const { programmeStore: { setHasBeenModify } } = this.props;
+ const { planDatas } = this.state;
+ //先统一上下限值
+ let dataSource = _.reduce(planDatas, (pre, cur) => {
+ const curData = _.find(datas, o => o.insuranceId === cur.insuranceId);
+ return [...pre, { ...cur, lowerLimit: curData.lowerLimit, upperLimit: curData.upperLimit }];
+ }, []);
+ //再赋值修改值
+ dataSource = _.reduce(dataSource, (pre, cur) => {
+ const curData = _.find(datas, o => o.id === cur.id);
+ return [...pre, { ...cur, ...curData }];
+ }, []);
+ this.setState({ planDatas: dataSource }, () => setHasBeenModify(true));
+ };
+
render() {
- const { conditions } = this.state;
- const {
- programmeStore: { planForm, setHasBeenModify }, showOperateBtn, visible
- } = this.props;
+ const { conditions, planDatas, selectedKey } = this.state;
+ const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
this.handleClose(false)}
content={
{getSearchs(planForm, conditions, 1, false, this.onChange)}
+
+
+
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
new file mode 100644
index 00000000..a6df66c4
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
@@ -0,0 +1,337 @@
+/*
+ * Author: 黎永顺
+ * name: 社保方案重构-方案设置列表
+ * Description:
+ * Date: 2024/2/5
+ */
+import React, { Component } from "react";
+import { WeaCheckbox, WeaHelpfulTip, WeaInputNumber, WeaLocaleProvider, WeaSelect, WeaTableEdit } from "ecCom";
+import PaymentPeriodModal from "../../../programme/paymentPeriodModal";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class PlanSetTable extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ datas: [], paymentPeriodModal: {
+ visible: false, record: {}, cycleSetting: "000000000000"
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.selectedKey !== this.props.selectedKey || nextProps.dataSource !== this.props.dataSource) {
+ this.setState({ datas: _.filter(nextProps.dataSource, o => String(o.paymentScopeValue) === nextProps.selectedKey) });
+ }
+ }
+
+ /*
+ * Author: 黎永顺
+ * Description: 缴纳周期-自定义设置
+ * Params:
+ * Date: 2024/2/6
+ */
+ handleSetPaymentPeriod = (cycleSetting) => {
+ const { datas, paymentPeriodModal } = this.state;
+ const { record: { id } } = paymentPeriodModal;
+ let cycleObj = {
+ 1: "0",
+ 2: "0",
+ 3: "0",
+ 4: "0",
+ 5: "0",
+ 6: "0",
+ 7: "0",
+ 8: "0",
+ 9: "0",
+ 10: "0",
+ 11: "0",
+ 12: "0"
+ };
+ if (!_.isEmpty(cycleSetting)) {
+ _.forEach(cycleSetting, item => {
+ _.assign(cycleObj, { [item]: "1" });
+ });
+ } else {
+ _.forEach(Object.keys(cycleObj), item => {
+ _.assign(cycleObj, { [item]: "0" });
+ });
+ }
+ const tmpVStr = _.reduce(Object.values(cycleObj), (pre, cur) => {
+ return pre + cur;
+ }, "");
+ this.setState({
+ datas: _.map(datas, o => {
+ if (id === o.id) {
+ return { ...o, cycleSetting: tmpVStr };
+ } else {
+ return o;
+ }
+ })
+ }, () => this.props.onPlanSet(this.state.datas));
+ };
+
+ render() {
+ const { datas, paymentPeriodModal } = this.state;
+ const { showOperateBtn } = this.props;
+ const columns = [
+ {
+ title: getLabel(15795, "类型名称"),
+ dataIndex: "insuranceName",
+ key: "insuranceName",
+ width: 120, fixed: "left",
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: text => ({text})
+ }]
+ },
+ {
+ title: getLabel(543168, "是否缴费"),
+ dataIndex: "isPayment",
+ key: "isPayment",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, isPayment: isPayment === "1" },
+ index, key: "custom"
+ })}/>
+ )
+ }]
+ },
+ {
+ title: getLabel(543169, "缴纳对象"),
+ dataIndex: "paymentScope",
+ key: "paymentScope",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: text => ({text})
+ }]
+ },
+ {
+ title: ,
+ dataIndex: "paymentCycle",
+ key: "paymentCycle",
+ width: 200,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => ()
+ }]
+ },
+ {
+ title: getLabel(543170, "核算方式"),
+ dataIndex: "accountType",
+ key: "accountType",
+ width: 200,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, accountType },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543171, "基数下限"),
+ dataIndex: "lowerLimit",
+ key: "lowerLimit",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, lowerLimit },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543172, "基数上限"),
+ dataIndex: "upperLimit",
+ key: "upperLimit",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, upperLimit },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543173, "缴纳比例%"),
+ dataIndex: "paymentProportion",
+ key: "paymentProportion",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, paymentProportion },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543174, "固定费用"),
+ dataIndex: "fixedCost",
+ key: "fixedCost",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, fixedCost },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543175, "有效小数位"),
+ dataIndex: "validNum",
+ key: "validNum",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, validNum },
+ index, key: "custom"
+ })}/>)
+ }]
+ },
+ {
+ title: getLabel(543176, "进位规则"),
+ dataIndex: "rententionRule",
+ key: "rententionRule",
+ width: 120,
+ com: [{
+ type: "custom",
+ key: "custom",
+ render: (text, record, index, onEdit) => (
+ onEdit({
+ record: { ...record, rententionRule },
+ index, key: "custom"
+ })}/>)
+ }]
+ }
+ ];
+ return (
+
+ this.setState({ datas }, () => this.props.onPlanSet(this.state.datas))}
+ />
+ this.setState({
+ paymentPeriodModal: {
+ visible: false, record: {}, cycleSetting: "000000000000"
+ }
+ })}
+ onSetPaymentPeriod={this.handleSetPaymentPeriod}
+ />
+
+ );
+ }
+}
+
+export default PlanSetTable;
+
+const PaymentCycleTitle = () => (
+
{getLabel(543158, "缴纳周期")}
+
+ {getLabel(544738, "例:养老保险缴纳周期选择3/6/9/12;")}
+
+
+ {
+ getLabel(544739, "若:核算方式选择基数求和*比例;则数据核算逻辑为:\n" +
+ " 账单月1月2月时,养老保险不会被核算;\n" +
+ " 账单月3月时,养老保险核算金额为:养老保险月缴纳基数*3*缴纳比例+固定费用*3\n" +
+ " (3代表1月2月3月 3个月,*3代表3个月基数相加和固定费用相加)")
+ }
+
+
+
+ {
+ getLabel(544740, "若:核算方式选择基数*比例再求和;则数据核算逻辑为:\n" +
+ " 账单月1月2月时,养老保险不会被核算;\n" +
+ " 账单月3月时,养老保险核算金额为:\n" +
+ " 将1~3月算出来的【养老保险月缴纳基数*缴纳比例+固定费用】求和")
+ }
+
+
+ {getLabel(544741, "若:缴纳周期选择选择月缴,则核算方式默认为【基数*比例+固定费用】,不可修改")}
+
+ }
+ placement="topLeft"
+ />
+);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
index f6af25b1..af9ea9da 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
@@ -44,6 +44,7 @@ class Index extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if ((nextProps.selectedKey !== this.props.selectedKey) || (nextProps.isQuery !== this.props.isQuery)) {
this.setState({
+ welfarePlanEditSlide: { visible: false, id: "", welfareTypeEnum: "", title: "" },
pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 }
}, () => this.getList(nextProps));
}
@@ -57,7 +58,10 @@ class Index extends Component {
}
getList = (props) => {
- const { programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, customQuery } = props;
+ const {
+ programmeStore: { planSearchForm }, selectedKey: welfareTypeEnum, customQuery,
+ taxAgentStore: { showOperateBtn }
+ } = props;
const { pageInfo } = this.state;
const originPayload = { ...pageInfo, welfareTypeEnum }, customPayload = { welfareTypeEnum: customQuery },
welfarePayload = { ...planSearchForm.getFormParams() };
@@ -100,7 +104,10 @@ class Index extends Component {
break;
case "isUse":
col = {
- ...col, render: (__, record) => ()
+ ...col, render: (__, record) => ( this.handleCustomBenefitsSwitch(record, value)}
+ />)
};
break;
default:
@@ -184,6 +191,35 @@ class Index extends Component {
break;
}
};
+ handleCustomBenefitsSwitch = ({ id }, isUse) => {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: isUse === "1" ? getLabel(111, "确定要启用吗?") : getLabel(111, "确定要停用吗?"),
+ onOk: () => {
+ const payload = { id, isUse };
+ API.updateCustomCategoryStatus(payload).then(({ status, errormsg }) => {
+ if (status) {
+ message.success("操作成功");
+ this.getList(this.props);
+ } else {
+ message.error(errormsg || "操作失败");
+ }
+ });
+ },
+ onCancel: () => {
+ this.setState({
+ dataSource: _.map(this.state.dataSource, item => {
+ if (item.id === id) {
+ return {
+ ...item, isUse: item.isUse
+ };
+ }
+ return { ...item };
+ })
+ });
+ }
+ });
+ };
render() {
const { dataSource, columns, pageInfo, loading, copyDialog, customDialog, welfarePlanEditSlide } = this.state;
@@ -244,7 +280,7 @@ class Index extends Component {
title: getLabel(18610, "操作"),
dataIndex: "operation", width: 120,
render: (__, record) => ( this.handleOpts("view", record)}>{getLabel(33564, "查看")})
+ onClick={() => this.handleOpts(selectedKey === "CUSTOM" ? "custom-edit" : "edit", record)}>{getLabel(33564, "查看")})
}]}
/>
@@ -259,7 +295,7 @@ class Index extends Component {
}, () => isRefrese && this.getList(this.props))}
/>
{/*新建编辑自定义方案*/}
- this.setState({
customDialog: { ...customDialog, visible: false, customId: "" }
}, () => isRefrese && this.getList(this.props))}
@@ -267,7 +303,7 @@ class Index extends Component {
{/*新建编辑方案*/}
this.setState({
- welfarePlanEditSlide: { ...welfarePlanEditSlide, visible: isFresh }
+ welfarePlanEditSlide: { ...welfarePlanEditSlide, visible: false }
}, () => isFresh && this.getList(this.props))}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index 59f41a5d..e10d7ebf 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -103,6 +103,22 @@
}
.welfare-plan-edit-layout {
+ .flex-center {
+ display: flex;
+ align-items: center;
+
+ .wea-select {
+ flex: 1;
+ margin-right: 4px;
+ }
+ }
+
+ .ant-table-fixed-left {
+ .ant-table-tbody > tr {
+ height: 41px !important;
+ }
+ }
+
.titleDialog {
display: flex;
justify-content: space-between;
From 5614a0da6d28b6d10f26049bc4b5c7a5d819648b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 6 Feb 2024 17:36:15 +0800
Subject: [PATCH 6/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfarePlan/components/welfarePlanEditSlide/index.js | 7 ++++---
.../components/welfarePlanEditSlide/planSetTable.js | 2 +-
.../pages/socialSecurityBenefits/welfarePlan/index.js | 2 +-
.../pages/socialSecurityBenefits/welfarePlan/index.less | 8 ++++++++
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index 2b5168d1..0a1bf9c9 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -13,6 +13,7 @@ import * as API from "../../../../../apis/welfareScheme";
import { getTaxAgentSelectListAsAdmin } from "../../../../../apis/taxAgent";
import { getConditionDomkeys, getSearchs } from "../../../../../util";
import { planConditons } from "../../config";
+import cs from "classnames";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -51,7 +52,7 @@ class Index extends Component {
if (getKey(o) === "taxAgentIds") {
return {
...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
- viewAttr: schemeBatch["sharedType"] === "1" ? 3 : showOperateBtn ? o.viewAttr : 1,
+ viewAttr: (schemeBatch["sharedType"] === "1" && showOperateBtn) ? 3 : showOperateBtn ? o.viewAttr : 1,
options: _.map(result, k => ({ key: k.id, showname: k.content }))
};
}
@@ -189,8 +190,8 @@ class Index extends Component {
const { programmeStore: { planForm }, showOperateBtn } = this.props;
return (
this.handleClose(false)}
content={
{getSearchs(planForm, conditions, 1, false, this.onChange)}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
index a6df66c4..9447e487 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
@@ -153,7 +153,7 @@ class PlanSetTable extends Component {
type: "custom",
key: "custom",
render: (text, record, index, onEdit) => (
-
{/*操作日志*/}
- this.setState({ logDialogVisible: false })}/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index e10d7ebf..dc2ed68b 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -235,6 +235,14 @@
}
}
+.nopermission-welfare-plan-edit-layout {
+ .ant-table-fixed-left {
+ .ant-table-tbody > tr {
+ height: 37.38px !important
+ }
+ }
+}
+
.zIndex0-welfare-plan {
.wea-new-top-req {
z-index: 0 !important;
From 47608b05226c84ece5f0f1d5312d154a1eca2a19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Sun, 18 Feb 2024 14:48:06 +0800
Subject: [PATCH 7/9] =?UTF-8?q?feature/2.10.1.2401.01-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=96=B9=E6=A1=88=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfarePlan/components/welfarePlanCustomDialog/index.js | 2 +-
.../welfarePlan/components/welfarePlanEditSlide/index.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
index bce632b6..d8f277d3 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCustomDialog/index.js
@@ -48,7 +48,7 @@ class Index extends Component {
const { programmeStore: { planCustomForm } } = props;
planCustomForm.initFormFields(this.state.conditions);
_.forEach(getConditionDomkeys(this.state.conditions), k => {
- if (k === "paymentScope" && props.customId) {
+ if (k === "paymentScope" && props.customId && form[k]) {
planCustomForm.updateFields({ [k]: { value: form[k].join(",") } });
} else {
planCustomForm.updateFields({ [k]: { value: form[k] || "" } });
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index 0a1bf9c9..a70da52f 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -82,7 +82,7 @@ class Index extends Component {
const { planDatas } = this.state;
const payload = {
insuranceScheme: {
- ...planForm.getFormParams(), welfareTypeEnum, id,
+ ...planForm.getFormParams(), welfareType: welfareTypeEnum, id,
paymentArea: planForm.getFormParams().paymentType
},
insuranceSchemeDetailList: planDatas
@@ -174,6 +174,7 @@ class Index extends Component {
//先统一上下限值
let dataSource = _.reduce(planDatas, (pre, cur) => {
const curData = _.find(datas, o => o.insuranceId === cur.insuranceId);
+ if (_.isEmpty(curData)) return [...pre, cur];
return [...pre, { ...cur, lowerLimit: curData.lowerLimit, upperLimit: curData.upperLimit }];
}, []);
//再赋值修改值
From d6ec6c71e8d3673a416f7d1411c0586a93a50595 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Mon, 19 Feb 2024 11:11:58 +0800
Subject: [PATCH 8/9] =?UTF-8?q?feature/2.10.1.2401.01-=E5=B7=A5=E8=B5=84?=
=?UTF-8?q?=E5=8D=95=E9=85=8D=E7=BD=AE=E5=8F=8D=E9=A6=88=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/payrollTempBaseSet/index.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
index 99817be5..904d9ca4 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempBaseSet/index.js
@@ -298,16 +298,17 @@ class Index extends Component {
if (it.title === getLabel(544092, "工资单确认反馈设置")) {
return {
...it, items: _.map(it.items, o => {
- if (getKey(o) === "autoAckDays") {
+ if (getKey(o) === "autoAckDays" && key === "ackFeedbackStatus") {
return {
- ...o, hide: key === "ackFeedbackStatus" && params["ackFeedbackStatus"].value === "0"
+ ...o, hide: params["ackFeedbackStatus"].value === "0"
};
- } else if (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl") {
+ } else if (key === "feedbackStatus" && (getKey(o) === "feedbackUrl" || getKey(o) === "mobileFeedbackUrl")) {
return {
- ...o, hide: key === "feedbackStatus" && params["feedbackStatus"].value === "0"
+ ...o, hide: params["feedbackStatus"].value === "0"
};
+ } else {
+ return { ...o };
}
- return { ...o };
})
};
}
From 5afb7e107af8ff6432454293a3fc3fb63b541a76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 20 Feb 2024 15:45:31 +0800
Subject: [PATCH 9/9] 0release/2.10.1.2401.01
---
.../welfareAdvanceSearchPannel/index.js | 34 +++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
index 11fb3505..334b851e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js
@@ -5,13 +5,14 @@
* Date: 2023/10/31
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaLocaleProvider, WeaTools } 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;
+const getKey = WeaTools.getKey;
@inject("archivesStore")
@observer
@@ -27,7 +28,36 @@ class WelfareAdvanceSearchPannel extends Component {
getSaCondition().then(({ status, data }) => {
if (status) {
this.setState({
- searchConditions: data.condition
+ searchConditions: _.map(data.condition, item => ({
+ ...item, items: _.map(item.items, o => {
+ if (getKey(o) === "departmentIdsStr" || getKey(o) === "positionsStr" || getKey(o) === "subcompanyIdsStr") {
+ return {
+ ...o, browserConditionParam: {
+ completeParams: {},
+ conditionDataParams: {},
+ dataParams: {},
+ destDataParams: {},
+ hasAddBtn: false,
+ hasAdvanceSerach: false,
+ idSeparator: ",",
+ isAutoComplete: 1,
+ isDetail: 0,
+ isMultCheckbox: false,
+ isSingle: false,
+ icon: "icon-coms-hrm",
+ linkUrl: "",
+ pageSize: 10,
+ quickSearchName: "",
+ replaceDatas: [],
+ title: "",
+ type: getKey(o) === "departmentIdsStr" ? "57" : getKey(o) === "positionsStr" ? "278" : "194",
+ viewAttr: 2
+ }
+ };
+ }
+ return { ...o };
+ })
+ }))
}, () => {
const { archivesStore: { welfareForm } } = this.props;
welfareForm.initFormFields(this.state.searchConditions);