From 147749796ab02cb65bbb5843aa3c3babeb05a054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 12 Jul 2023 11:32:15 +0800 Subject: [PATCH 01/74] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js index 1f09d059..15a099ae 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js @@ -47,7 +47,7 @@ class SalaryItemForm extends Component { case "valueType": return { ...item, - viewAttr: isAdd ? 2 : 1 + // viewAttr: isAdd ? 2 : 1 }; case "formulaContent": return { From b3e5d2ba1c95950460fb113170ab477e129906e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 13 Jul 2023 14:58:27 +0800 Subject: [PATCH 02/74] =?UTF-8?q?dev=E5=90=88=E5=B9=B6=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E5=8F=8D=E9=A6=88=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/payroll/stepForm/baseInformForm.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index b3788b60..8c5ec65b 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -98,13 +98,12 @@ export default class BaseInformForm extends React.Component { }; render() { - const { request, options, replenishRuleOptions } = this.state; + const { request, options, replenishRuleOptions, salaryMonthOptions } = this.state; const { salarySob, name, description, replenishName, replenishRule, reissueRule, msgStatus, emailStatus, - ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, - autoSendTimeOfDay, autoSendCycleType + ackFeedbackStatus, autoAckDays, feedbackUrl, autoSendStatus, autoSendDayOfMonth, autoSendTimeOfDay, + autoSendCycleType } = request; - return ( @@ -201,7 +200,7 @@ export default class BaseInformForm extends React.Component { autoSendStatus: value === "1", autoSendDayOfMonth: value === "1" ? "1" : null, autoSendTimeOfDay: value === "1" ? "09:00" : null, - autoSendCycleType: value === "1" ? 1 : null, + autoSendCycleType: value === "1" ? 1 : null }); }}/> From 28471fe108e3d89ed3decb0e603863af9ac6fc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 27 Jul 2023 09:55:51 +0800 Subject: [PATCH 03/74] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/customForm/index.js | 2 +- .../pages/socialSecurityBenefits/archives/index.js | 6 +++--- .../programme/customBenefitsTable.js | 12 ++++++++++++ pc4mobx/hrmSalary/stores/archives.js | 8 ++++---- pc4mobx/hrmSalary/stores/programme.js | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/components/customForm/index.js b/pc4mobx/hrmSalary/components/customForm/index.js index 5041a53d..4348762d 100644 --- a/pc4mobx/hrmSalary/components/customForm/index.js +++ b/pc4mobx/hrmSalary/components/customForm/index.js @@ -45,7 +45,7 @@ export default class CustomForm extends React.Component { item.options && ({ showname: o.showname, key: o.key }))} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index c0111c45..8b078187 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -251,7 +251,7 @@ export default class Archives extends React.Component { }); return; } - save("SOCIAL_SECURITY").then(() => { + save("SOCIAL_SECURITY", this.record.paymentOrganization).then(() => { this.query(); }); } else if (selectedTab == 2) { @@ -264,7 +264,7 @@ export default class Archives extends React.Component { }); return; } - save("ACCUMULATION_FUND").then(() => { + save("ACCUMULATION_FUND", this.record.paymentOrganization).then(() => { this.query(); }); } else if (selectedTab == 3) { @@ -277,7 +277,7 @@ export default class Archives extends React.Component { }); return; } - save("OTHER").then(() => { + save("OTHER", this.record.paymentOrganization).then(() => { this.query(); }); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js index ab5cb070..b1c13f56 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js @@ -98,6 +98,18 @@ class CustomBenefitsTable extends Component { message.error(errormsg || "操作失败"); } }); + }, + onCancel: () => { + this.setState({ + dataSource: _.map(this.state.dataSource, item => { + if (item.id === id) { + return { + ...item, isUse: item.isUse + }; + } + return { ...item }; + }) + }); } }); }; diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index 7ba4e492..56bd3b12 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -244,11 +244,11 @@ export class ArchivesStore { // 保存表单 @action - save = (welfareType) => { + save = (welfareType, paymentOrganization) => { let baseForm = ""; let paymentForm = ""; if (welfareType === "SOCIAL_SECURITY") { - baseForm = JSON.stringify(this.socialSecurityForm.data); + baseForm = JSON.stringify({ ...this.socialSecurityForm.data, paymentOrganization }); if (this.socialSecurityForm.data.socialSchemeId) { const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data; const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items; @@ -259,7 +259,7 @@ export class ArchivesStore { paymentForm = JSON.stringify(payload); } } else if (welfareType === "ACCUMULATION_FUND") { - baseForm = JSON.stringify(this.accumulationFundForm.data); + baseForm = JSON.stringify({ ...this.accumulationFundForm.data, paymentOrganization }); if (this.accumulationFundForm.data.fundSchemeId) { const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data; const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items; @@ -270,7 +270,7 @@ export class ArchivesStore { paymentForm = JSON.stringify(payload); } } else if (welfareType === "OTHER") { - baseForm = JSON.stringify(this.otherForm.data); + baseForm = JSON.stringify({ ...this.otherForm.data, paymentOrganization }); if (this.otherForm.data.otherSchemeId) { const otherPaymentData = toJS(this.otherPaymentForm).data; const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items; diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js index b6d994d0..9c63e3d3 100644 --- a/pc4mobx/hrmSalary/stores/programme.js +++ b/pc4mobx/hrmSalary/stores/programme.js @@ -325,7 +325,7 @@ export class ProgrammeStore { @action updateCustomCategory = (params) => { return new Promise((resolve, reject) => { - API.updateCustomCategory(_.pick(params, ["id", "insuranceName"])).then(res => { + API.updateCustomCategory(_.pick(params, ["id", "insuranceName", "paymentScope"])).then(res => { if (res.status) { message.success("编辑成功"); resolve(); From a3fde65b39afabe49980eed1787f5d969bcceb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 27 Jul 2023 11:00:57 +0800 Subject: [PATCH 04/74] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/stores/programme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js index 9c63e3d3..3cbc9c91 100644 --- a/pc4mobx/hrmSalary/stores/programme.js +++ b/pc4mobx/hrmSalary/stores/programme.js @@ -325,7 +325,10 @@ export class ProgrammeStore { @action updateCustomCategory = (params) => { return new Promise((resolve, reject) => { - API.updateCustomCategory(_.pick(params, ["id", "insuranceName", "paymentScope"])).then(res => { + API.updateCustomCategory({ + ..._.pick(params, ["id", "insuranceName"]), + paymentScope: _.pick(params, ["paymentScope"]).paymentScope.split(",") + }).then(res => { if (res.status) { message.success("编辑成功"); resolve(); From d7bfa245d5d6009dce1de428dac62ebedfcb1088 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, 1 Aug 2023 11:19:23 +0800 Subject: [PATCH 05/74] =?UTF-8?q?=E4=BA=A7=E5=93=81-dev=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/passSetDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From dbae61623d7c5b020d5503304e2291cddb7d8ba0 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, 1 Aug 2023 15:48:47 +0800 Subject: [PATCH 06/74] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E5=8D=95=E6=A8=A1=E6=9D=BF=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/payroll/stepForm/salaryItemSettings.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js index a8c4c2ff..ff2829d7 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js @@ -219,8 +219,6 @@ class SalaryItemSettings extends Component { } }; handleEditSalaryItemName = (item, field, viewAttr) => { - //暂时关闭 - return const { groupId } = item, { salaryItemId } = field, { dataList } = this.state; if (groupId === "111111111111111111") return; this.setState({ @@ -270,7 +268,17 @@ class SalaryItemSettings extends Component { salaryItemShowName: originName === name ? "" : name }], itemShowNamesetting, "salaryItemId") }, () => { - this.props.onChangeSalaryItem(this.state.dataList); + const modifySalaryItemids = _.reduce(this.state.itemShowNamesetting, (pre, cur) => [...pre, cur.salaryItemId], []); + const convertDataList = _.map(this.state.dataList, it => { + return { + ...it, + items: _.map(it.items, item => { + if (modifySalaryItemids.includes(item.salaryItemId)) return { ...item }; + return { ...item, name: item.salaryItemShowName }; + }) + }; + }); + this.props.onChangeSalaryItem(convertDataList); this.props.onChangeSalaryItemShowNamesetting(this.state.itemShowNamesetting); }); }; From b14fce79495e30f97d84107d661e4b399e983044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 31 Oct 2023 15:30:21 +0800 Subject: [PATCH 07/74] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 4 +- .../components/advanceInputBtn/index.js | 33 ++++++ .../components/advanceInputBtn/index.less | 29 +++++ .../welfareAdvanceSearchPannel/index.js | 66 +++++++++++ .../components/welfareTableList/index.js | 104 ++++++++++++++++++ .../components/welfareTip/index.js | 22 ++++ .../welfareArchive/config.js | 7 ++ .../welfareArchive/index.js | 104 ++++++++++++++++++ .../welfareArchive/index.less | 77 +++++++++++++ pc4mobx/hrmSalary/stores/archives.js | 1 + 10 files changed, 446 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 366de6cc..13e2be4c 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -3,7 +3,8 @@ import Route from "react-router/lib/Route"; import { WeaLocaleProvider } from "ecCom"; import MySalary from "./pages/mySalary"; import Programme from "./pages/socialSecurityBenefits/programme"; -import Archives from "./pages/socialSecurityBenefits/archives"; +import Archivess from "./pages/socialSecurityBenefits/archives"; +import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面 import StandingBook from "./pages/socialSecurityBenefits/standingBook"; import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail"; import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison"; @@ -114,6 +115,7 @@ const Routes = ( component={SocialSecurityBenefits}> + + welfareForm.updateFields({ username: v })} + onSearch={this.props.onAdvanceSearch} + /> + + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less new file mode 100644 index 00000000..9081d39f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/advanceInputBtn/index.less @@ -0,0 +1,29 @@ +.achrive-advance-search { + display: flex; + align-items: center; + position: relative; + top: -1.5px; + + .wea-advanced-search { + top: 2px; + left: -1px; + height: 28px; + line-height: 1; + border-radius: 0; + position: relative; + color: #474747; + padding: 4px 15px; + } + + .wea-advanced-search:hover { + border: 1px solid #dadada; + color: #474747; + } + + .text-elli { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + top: 1px; + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js new file mode 100644 index 00000000..11fb3505 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareAdvanceSearchPannel/index.js @@ -0,0 +1,66 @@ +/* + * Author: 黎永顺 + * name: 社保福利档案页面重构-高级搜索面板 + * Description: + * Date: 2023/10/31 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Button } from "antd"; +import { inject, observer } from "mobx-react"; +import { getSaCondition } from "../../../../../apis/archive"; +import { getSearchs } from "../../../../../util"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("archivesStore") +@observer +class WelfareAdvanceSearchPannel extends Component { + constructor(props) { + super(props); + this.state = { + searchConditions: [] + }; + } + + componentDidMount() { + getSaCondition().then(({ status, data }) => { + if (status) { + this.setState({ + searchConditions: data.condition + }, () => { + const { archivesStore: { welfareForm } } = this.props; + welfareForm.initFormFields(this.state.searchConditions); + }); + } + }); + } + + render() { + const { searchConditions } = this.state; + const { archivesStore: { welfareForm } } = this.props; + return ( + +
+ {getSearchs(welfareForm, searchConditions, 2, false)} +
+
+
+ + + + + + + + + +
+
+
+ ); + } +} + +export default WelfareAdvanceSearchPannel; + diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js new file mode 100644 index 00000000..a24c4383 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -0,0 +1,104 @@ +/* + * Author: 黎永顺 + * name:社保福利档案页面重构-列表 + * Description: + * Date: 2023/10/31 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import { inject, observer } from "mobx-react"; +import { getExtTable, queryList } from "../../../../../apis/welfareArchive"; + +const getLabel = WeaLocaleProvider.getLabel; +const APILIST = { + runStatuses: queryList, + ext: getExtTable +}; + +@inject("archivesStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + dataSource: [], columns: [], loading: false, pageInfo: { current: 0, pageSize: 10, total: 0 }, + selectedRowKeys: [] + }; + } + + componentDidMount() { + this.getWelfareList(this.props); + } + + componentWillReceiveProps(nextProps, nextContext) { + if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) this.getWelfareList(nextProps); + } + + getWelfareList = (props) => { + const { pageInfo } = this.state; + const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount } = props; + const params = { ...pageInfo, ...welfareForm.getFormParams() }; + const payload = runStatuses === "ext" ? { ...params, extWelArchiveList: true } : { + ...params, + runStatuses: runStatuses.split(",") + }; + this.setState({ loading: true }); + APILIST[runStatuses === "ext" ? "ext" : "runStatuses"](payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { columns, datas: dataSource, pageInfo: { pageNum: current, pageSize, total } } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, + columns: _.map(columns, o => { + const { column: dataIndex, text: title, width } = o; + if (dataIndex === "employeeName") { + return { + dataIndex, title, width, fixed: "left", + render: (txt) => ({txt}) + }; + } else { + return { + dataIndex, title, width, + render: (txt) => ({txt}) + }; + } + }) + }, () => onChangeTopTabCount(runStatuses, total)); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state; + console.log(columns); + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => this.getWelfareList(this.props)); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => this.getWelfareList(this.props)); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) + }; + return ( + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js new file mode 100644 index 00000000..12ef7f84 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTip/index.js @@ -0,0 +1,22 @@ +/* + * Author: 黎永顺 + * name:社保福利档案页面重构-小提示 + * Description: + * Date: 2023/10/31 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( +
+ +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js new file mode 100644 index 00000000..7588fb29 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js @@ -0,0 +1,7 @@ +export const tabList = [ + { viewcondition: "1", lanId: 542711, title: "待增员", showcount: true, groupid: "stayAdd" }, + { viewcondition: "2,3", lanId: 542504, title: "在缴员工", showcount: true, groupid: "paying" }, + { viewcondition: "3", lanId: 542713, title: "待减员", showcount: true, groupid: "stayDel" }, + { viewcondition: "4,5", lanId: 542505, title: "停缴员工", showcount: true, groupid: "stopPay" }, + { viewcondition: "ext", lanId: 542679, title: "非系统人员", showcount: true, groupid: "ext" } +]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js new file mode 100644 index 00000000..3dc5058a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js @@ -0,0 +1,104 @@ +/* + * Author: 黎永顺 + * name: 社保福利档案页面重构 + * Description: + * Date: 2023/10/31 + */ +import React, { Component } from "react"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaReqTop, WeaTab } from "ecCom"; +import { inject, observer } from "mobx-react"; +import AdvanceInputBtn from "./components/advanceInputBtn"; +import WelfareAdvanceSearchPannel from "./components/welfareAdvanceSearchPannel"; +import WelfareTableList from "./components/welfareTableList"; +import { queryInsuranceTabTotal } from "../../../apis/welfareArchive"; +import { Button } from "antd"; +import cs from "classnames"; +import { tabList } from "./config"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("taxAgentStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "1", showSearchAd: false, isQuery: false, + topTabCount: { stayAdd: 0, paying: 0, stayDel: 0, stopPay: 0, ext: 0 } + }; + } + + queryInsuranceTabTotal = (active, total) => { + queryInsuranceTabTotal().then(({ status, data }) => { + if (status) { + const key = _.find(tabList, o => o.viewcondition === active).groupid; + this.setState({ + topTabCount: { ...this.state.topTabCount, ...data, [key]: total } + }); + } + }); + }; + renderReqBtns = () => { + const { selectedKey } = this.state; + let reqBtns = [ + , + this.setState({ showSearchAd: true })} + onAdvanceSearch={() => this.setState({ isQuery: !this.state.isQuery })} + /> + ]; + switch (selectedKey) { + case "1": + reqBtns.unshift( + {getLabel(544348, "提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除,因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。")} + + } + />); + break; + default: + break; + } + return reqBtns; + }; + onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery }); + + render() { + const { selectedKey, topTabCount, showSearchAd, isQuery } = this.state; + const { taxAgentStore: { showOperateBtn } } = this.props; + return ( +
+ } + iconBgcolor="#F14A2D" buttons={this.renderReqBtns()} showDropIcon + replaceTab={ + ({ ...o, title: getLabel(o.lanId, o.title) }))} autoCalculateWidth + keyParam="viewcondition" selectedKey={selectedKey} counts={topTabCount} countParam="groupid" + onChange={key => this.setState({ selectedKey: key })} + /> + } + > +
+
+ this.setState({ showSearchAd: false })} + onAdSearch={this.onAdSearch} + /> +
+ {/*列表*/} + +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less new file mode 100644 index 00000000..35e4ca7f --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.less @@ -0,0 +1,77 @@ +.salary-welfare-archive { + min-width: 1000px; + overflow: auto; + width: 100%; + height: 100%; + background: #f6f6f6; + + .wea-new-top-req-title > div:first-child > div > div { + padding-left: 0 !important; + + .wea-tab { + border-bottom: none; + } + } + + .salary-welfare-archive-content { + padding: 8px 16px; + height: 100%; + + .wea-new-table { + background: #ffffff; + + .ant-table-tbody { + td { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + } + + .searchAdvanced-condition-hide { + display: none; + } + + .searchAdvanced-condition-container { + background: #FFF; + margin-bottom: 10px; + border: 1px solid #e5e5e5; + + .wea-search-buttons { + border-top: 1px solid #dadada; + padding: 15px 0; + } + + .wea-advanced-searchsAd { + height: 320px; + overflow: hidden auto; + + .formItem-delete { + position: absolute; + top: 0; + right: -40px; + } + + .searchAdvanced-commonSelect { + border-top: 1px solid #ebebeb; + margin: 0 25px; + padding: 10px 0; + } + + .custom-advance-largeSpacing { + padding-left: 26px; + + .link { + border: none; + border-radius: 0; + padding: 12px 10px 12px 26px; + color: #2db7f5 + } + } + + } + } + } +} diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index 096a5ab7..5eeda9c0 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -9,6 +9,7 @@ const { TableStore } = WeaTableNew; export class ArchivesStore { @observable logForm = new WeaForm(); // 社保福利档案重构-日志查询条件log + @observable welfareForm = new WeaForm(); // 社保福利档案重构-列表查询form From c068959e73a59b51b41c97396c94e6f48b4c7b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 31 Oct 2023 16:59:50 +0800 Subject: [PATCH 08/74] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/welfareTableList/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index a24c4383..a87ffd25 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -56,12 +56,11 @@ class Index extends Component { dataIndex, title, width, fixed: "left", render: (txt) => ({txt}) }; - } else { - return { - dataIndex, title, width, - render: (txt) => ({txt}) - }; } + return { + dataIndex, title, width, + render: (txt) => ({txt}) + }; }) }, () => onChangeTopTabCount(runStatuses, total)); } @@ -70,7 +69,6 @@ class Index extends Component { render() { const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state; - console.log(columns); const pagination = { ...pageInfo, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, @@ -94,8 +92,12 @@ class Index extends Component { }; return ( (123) + }]} /> ); } From b2dda3a728efe6dd20e07d6922c94837ad9b0533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 1 Nov 2023 09:10:28 +0800 Subject: [PATCH 09/74] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../welfareArchive/components/welfareTableList/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index a87ffd25..aa7993ad 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -6,6 +6,7 @@ */ import React, { Component } from "react"; import { WeaLocaleProvider, WeaTable } from "ecCom"; +import {Table} from "antd" import { inject, observer } from "mobx-react"; import { getExtTable, queryList } from "../../../../../apis/welfareArchive"; @@ -91,7 +92,7 @@ class Index extends Component { onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) }; return ( - Date: Wed, 1 Nov 2023 16:18:51 +0800 Subject: [PATCH 10/74] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/welfareTableList/index.js | 98 +++++++++++-------- .../components/welfareTip/index.js | 10 +- .../welfareArchive/config.js | 78 +++++++++++++++ .../welfareArchive/index.js | 6 +- .../welfareArchive/index.less | 41 ++++++-- 5 files changed, 180 insertions(+), 53 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index aa7993ad..60cb2d50 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -5,8 +5,8 @@ * Date: 2023/10/31 */ import React, { Component } from "react"; -import { WeaLocaleProvider, WeaTable } from "ecCom"; -import {Table} from "antd" +import { WeaLocaleProvider } from "ecCom"; +import { Spin } from "antd"; import { inject, observer } from "mobx-react"; import { getExtTable, queryList } from "../../../../../apis/welfareArchive"; @@ -22,19 +22,43 @@ class Index extends Component { constructor(props) { super(props); this.state = { - dataSource: [], columns: [], loading: false, pageInfo: { current: 0, pageSize: 10, total: 0 }, + dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [] }; } componentDidMount() { - this.getWelfareList(this.props); + window.addEventListener("message", this.handleReceive, false); + } + + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); } componentWillReceiveProps(nextProps, nextContext) { - if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) this.getWelfareList(nextProps); + if ((nextProps.runStatuses !== this.props.runStatuses) || (nextProps.isQuery !== this.props.isQuery)) { + this.setState({ + pageInfo: { ...this.state.pageInfo, current: 1, pageSize: 10, total: 0 } + }, () => this.getWelfareList(nextProps)); + } } + handleReceive = async ({ data }) => { + const { type, payload: { id, params } = {} } = data; + if (type === "init") { + this.getWelfareList(this.props); + } else if (type === "turn") { + switch (id) { + case "PAGEINFO": + this.setState({ + pageInfo: { ...this.state.pageInfo, ...params } + }, () => this.getWelfareList(this.props)); + break; + default: + break; + } + } + }; getWelfareList = (props) => { const { pageInfo } = this.state; const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount } = props; @@ -54,52 +78,46 @@ class Index extends Component { const { column: dataIndex, text: title, width } = o; if (dataIndex === "employeeName") { return { - dataIndex, title, width, fixed: "left", - render: (txt) => ({txt}) + dataIndex, title, width, fixed: "left", ellipsis: true }; } return { - dataIndex, title, width, - render: (txt) => ({txt}) + dataIndex, title, width, ellipsis: true }; }) - }, () => onChangeTopTabCount(runStatuses, total)); + }, () => { + const { pageInfo, selectedRowKeys, columns, dataSource } = this.state; + onChangeTopTabCount(runStatuses, total); + this.postMessageToChild({ + dataSource, pageInfo, selectedRowKeys, runStatuses, + columns + }); + }); } }).catch(() => this.setState({ loading: false })); }; + postMessageToChild = (payload = {}) => { + const i18n = { + "操作": getLabel(30585, "操作"), + "共": getLabel(18609, "共"), "条": getLabel(18256, "条") + }; + const childFrameObj = document.getElementById("atdTable"); + childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); + }; render() { - const { dataSource, columns, loading, pageInfo, selectedRowKeys } = this.state; - const pagination = { - ...pageInfo, - showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, - showQuickJumper: true, - showSizeChanger: true, - pageSizeOptions: ["10", "20", "50", "100"], - onShowSizeChange: (current, pageSize) => { - this.setState({ - pageInfo: { ...pageInfo, current, pageSize } - }, () => this.getWelfareList(this.props)); - }, - onChange: current => { - this.setState({ - pageInfo: { ...pageInfo, current } - }, () => this.getWelfareList(this.props)); - } - }; - const rowSelection = { - selectedRowKeys, - onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) - }; + const { loading, dataSource } = this.state; return ( - (123) - }]} - /> +
+ +