From 2321266533fd28b36893e3838f11b84467749f56 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 4 Aug 2025 16:23:10 +0800
Subject: [PATCH 01/14] release/2.19.1.2501.01
---
pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
index f7648ef8..4305d22c 100644
--- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
+++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
@@ -43,5 +43,15 @@
}
}
+
+ .wea-new-table {
+ .wea-new-table .ant-table-tbody > tr > td,
+ .wea-new-table .ant-table-thead > tr > th {
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
}
From 2b39980ed0ecf2f3394aafef26a055158839dbf1 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 4 Aug 2025 16:24:41 +0800
Subject: [PATCH 02/14] release/2.19.1.2501.01
---
pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
index 4305d22c..fbeef936 100644
--- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
+++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.less
@@ -45,8 +45,8 @@
}
.wea-new-table {
- .wea-new-table .ant-table-tbody > tr > td,
- .wea-new-table .ant-table-thead > tr > th {
+ .ant-table-tbody > tr > td,
+ .ant-table-thead > tr > th {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
From 5f80e9e6b3c655ea5a4d19e5b594cc74f52314bb Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 4 Aug 2025 16:29:06 +0800
Subject: [PATCH 03/14] release/2.19.1.2501.01
---
pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
index a58245c7..813cb7d9 100644
--- a/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
+++ b/pc4mobx/hrmSalary/pages/adjustSalaryManage/index.js
@@ -62,7 +62,7 @@ class Index extends Component {
if (o.dataIndex === "username") {
return { ...o, width: 150, fixed: "left" };
}
- return { ...o, width: 150 };
+ return { ...o, width: 150, render: (v) => ({v}) };
}), {
dataIndex: "options", title: getLabel(30585, "操作"),
width: 120, render: (_, record) => (
From 5da8661bbdbf1df79ba33ba6048ba13e89761ffa Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 26 Aug 2025 14:25:26 +0800
Subject: [PATCH 04/14] =?UTF-8?q?0release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reportView/components/statisticalMicroSettingsSlide.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
index 9d1f5d7c..6124375d 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/statisticalMicroSettingsSlide.js
@@ -70,10 +70,10 @@ class StatisticalMicroSettingsSlide extends Component {
getTaxAgentSelectList = async (props) => {
const [salarySobList, empStatusList] = await Promise.all([
- postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA" }),
+ postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare }),
commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })
]);
- postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
+ postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare })
.then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
From 5ef2c5ecb435394134bb7d3d1926c6825f53acc7 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 2 Sep 2025 14:52:58 +0800
Subject: [PATCH 05/14] release/2.19.1.2501.01
---
pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index 5a334965..f221b0ef 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -13,6 +13,7 @@ import Content from "../../components/pcTemplate/content";
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import "./index.less";
+import { getQueryString } from "../../util/url";
const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
@@ -84,7 +85,13 @@ class MySalaryView extends Component {
const { captchaVisible, mySalaryStore } = this.state;
const { params: { salaryInfoId } } = this.props;
if (_.isEmpty(mySalaryStore)) {
- return
;
+ return
+ this.setState({ captchaVisible: false })}
+ onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
+ />
+
;
}
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
const salaryProps = {
@@ -106,11 +113,6 @@ class MySalaryView extends Component {
- this.setState({ captchaVisible: false })}
- onConfirm={() => mySalaryStore.setInitEmVerify()}
- />
);
}
From 9cda9aa414f60acd63848ec1b06ab094ce7b2794 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 4 Sep 2025 09:58:43 +0800
Subject: [PATCH 06/14] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index f221b0ef..e8b7cc58 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -89,7 +89,12 @@ class MySalaryView extends Component {
this.setState({ captchaVisible: false })}
- onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
+ onConfirm={() => {
+ this.props.mySalaryStore.setInitEmVerify();
+ this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
+ this.setState({ mySalaryStore: data });
+ });
+ }}
/>
;
}
From ff1da8b19bcdf32abbb923af4037e969cc16f19b Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Thu, 4 Sep 2025 09:59:22 +0800
Subject: [PATCH 07/14] release/2.19.1.2501.01
---
pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
index f221b0ef..e8b7cc58 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/mySalaryView.js
@@ -89,7 +89,12 @@ class MySalaryView extends Component {
this.setState({ captchaVisible: false })}
- onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
+ onConfirm={() => {
+ this.props.mySalaryStore.setInitEmVerify();
+ this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
+ this.setState({ mySalaryStore: data });
+ });
+ }}
/>
;
}
From 915e946c3e82dd738128a80b265d6094a73fa6bd Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Fri, 12 Sep 2025 09:57:54 +0800
Subject: [PATCH 08/14] release/2.19.1.2501.01
---
.../pages/declare/generateDeclarationDetail.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index 91a1a88f..22d1c5ea 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -2,6 +2,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getQueryString } from "../../util/url";
+import { sysinfo } from "../../apis/ruleconfig";
import * as API from "../../apis/declare";
import { Button } from "antd";
import "./index.less";
@@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
super(props);
this.state = {
loading: false, dataSource: [], columns: [], declareInfo: {},
- pageInfo: { current: 1, pageSize: 10, total: 0 }
+ pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
};
}
componentDidMount() {
this.getDetailList();
this.getDeclareInfo();
+ this.getSysinfo();
}
+ getSysinfo = () => {
+ sysinfo().then(({ status, data: sysinfo }) => {
+ if (status) this.setState({ sysinfo });
+ });
+ };
getDetailList = () => {
const { pageInfo } = this.state;
const payload = {
@@ -64,9 +71,10 @@ export default class GenerateDeclarationDetail extends React.Component {
window.open(url, "_self");
};
renderTitle = () => {
- const { declareInfo } = this.state;
+ const { declareInfo, sysinfo } = this.state;
+ const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
return (
- {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}
+ {title}:{declareInfo.salaryMonth}
{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}
);
};
From efb5af1b101addd9375f67a1061f6251f586ea69 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Fri, 10 Oct 2025 11:05:18 +0800
Subject: [PATCH 09/14] release/2.19.1.2501.01
---
.../salaryEditCalc/editCalcTable.js | 25 ++++++++++---------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
index 986bb1bb..c7798e3f 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/editCalcTable.js
@@ -125,17 +125,18 @@ class EditCalcTable extends Component {
}, 500);
});
const { routeParams: { salaryAcctRecordId } } = this.props;
- updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
- if (status) {
- clearInterval(this.timerLock);
- this.setState({
- progressVisible: false,
- progress: 0
- }, () => this.queryCalcResultList());
- } else {
- message.error(errormsg);
- }
- });
+ updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
+ .then(({ status, errormsg }) => {
+ if (status) {
+ clearInterval(this.timerLock);
+ this.setState({
+ progressVisible: false,
+ progress: 0
+ }, () => this.queryCalcResultList());
+ } else {
+ message.error(errormsg);
+ }
+ });
}
});
};
@@ -341,4 +342,4 @@ const traverse = (arr, calcDetail) => {
};
}
});
-};
+};
\ No newline at end of file
From b0d60afc11147f678a8a86a775a5a3061fd36d1d Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 13 Oct 2025 16:14:09 +0800
Subject: [PATCH 10/14] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/payroll/payrollDetail/payrollDetail.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
index a0c9e495..afa1ed7e 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
@@ -60,7 +60,8 @@ class PayrollDetail extends Component {
render() {
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
- const { taxAgentStore: { showOperateBtn } } = this.props;
+ const { taxAgentStore: { PageAndOptAuth } } = this.props;
+ const showOperateBtn = PageAndOptAuth.opts.includes("admin");
const { salaryMonth, template } = salarySendDetailBaseInfo;
const dropMenuDatas = [
{
@@ -110,4 +111,4 @@ class PayrollDetail extends Component {
}
}
-export default PayrollDetail;
+export default PayrollDetail;
\ No newline at end of file
From 7f4e47b5bd665a840e15a521a962b170eb0962f3 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 13 Oct 2025 17:11:10 +0800
Subject: [PATCH 11/14] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
index afa1ed7e..ab058017 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/payrollDetail.js
@@ -61,7 +61,7 @@ class PayrollDetail extends Component {
render() {
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
const { taxAgentStore: { PageAndOptAuth } } = this.props;
- const showOperateBtn = PageAndOptAuth.opts.includes("admin");
+ const showOperateBtn = PageAndOptAuth.opts.length;
const { salaryMonth, template } = salarySendDetailBaseInfo;
const dropMenuDatas = [
{
From 27f9da9aa9be042b81a3cebb602e0f6ba87b41a9 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 14 Oct 2025 15:54:00 +0800
Subject: [PATCH 12/14] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../standingBookDetail/components/makeupDifference.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
index c5e05729..66f4b8c1 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js
@@ -27,7 +27,7 @@ class MakeupDifference extends Component {
tmpUrl: "exportSiaccountWelfarebalanceimporttemplatetetemplate",
cacheUrl: "cacheBalanceWelfareList",
importUrl: "importBalanceInsuranceDetail",
- importparams: {}
+ importparams: {}, ..._.pick(this.props, ["billMonth", "paymentOrganization"])
},
returnEditPersonSlide: {
title: "", editId: "", visible: false
@@ -152,4 +152,4 @@ class MakeupDifference extends Component {
}
}
-export default MakeupDifference;
+export default MakeupDifference;
\ No newline at end of file
From 92c966310c860ba1501f7c4b67b086d8de09b751 Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Mon, 27 Oct 2025 14:55:34 +0800
Subject: [PATCH 13/14] =?UTF-8?q?feature/3.0.1.2504.01-=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E6=A1=86=E5=A4=9A=E9=80=89=E6=94=AF=E6=8C=81=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/CustomSelect/index.js | 80 +++++++++++++++++++
.../components/CustomSelect/index.less | 19 +++++
2 files changed, 99 insertions(+)
create mode 100644 pc4mobx/hrmSalary/components/CustomSelect/index.js
create mode 100644 pc4mobx/hrmSalary/components/CustomSelect/index.less
diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.js b/pc4mobx/hrmSalary/components/CustomSelect/index.js
new file mode 100644
index 00000000..d65fe2ba
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/CustomSelect/index.js
@@ -0,0 +1,80 @@
+/*
+ * 自定义多选下拉框
+ * 支持搜索
+ * @Author: 黎永顺
+ * @Date: 2024/9/13
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaLocaleProvider } from "ecCom";
+import classNames from "classnames";
+import { Select } from "antd";
+import "./index.less";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const Option = Select.Option;
+
+class Index extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ visible: false, dropdownWidth: 200, value: props.value ? props.value.split(",") : []
+ };
+ this.selectedData = {};
+ }
+
+ componentDidMount() {
+ const { dropdownWidth } = this.state;
+ const w = $(this.refs.customSelectMui).outerWidth();
+ console.log($(this.refs.customSelectMui), w)
+ if (dropdownWidth < w) {
+ this.setState({ dropdownWidth: w });
+ }
+ }
+
+ handleChange = (value) => {
+ this.setState({ value });
+ typeof this.props.onChange == "function" &&
+ this.props.onChange(`${value}`);
+ };
+
+ render() {
+ const { dropdownWidth, visible, value } = this.state;
+ const { options = [], defaultValue } = this.props;
+ const clsname = classNames({
+ "wea-associative-search-mult": true
+ });
+ return (
+
+
+
+ {!visible ? : }
+
+
+ );
+ }
+}
+
+export default Index;
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.less b/pc4mobx/hrmSalary/components/CustomSelect/index.less
new file mode 100644
index 00000000..ced4bc8e
--- /dev/null
+++ b/pc4mobx/hrmSalary/components/CustomSelect/index.less
@@ -0,0 +1,19 @@
+.customMuiSelect {
+ .ant-input-group-wrap {
+ i {
+ padding-left: 2px !important;
+ padding-right: 2px !important;
+ padding-top: 0;
+ padding-bottom: 0;
+ line-height: 28px;
+ height: 28px;
+ border-radius: 2px;
+ color: #333 !important;
+ }
+ }
+
+ .ant-select-selection--multiple {
+ max-height: 28px !important;
+ overflow-y: auto !important;
+ }
+}
From c00d3f446dc288416594acf2c663e98dbd31af6d Mon Sep 17 00:00:00 2001
From: lys <971387674@qq.com>
Date: Tue, 28 Oct 2025 15:09:36 +0800
Subject: [PATCH 14/14] =?UTF-8?q?release/3.0.1.2504.01-=E5=90=88=E5=B9=B6?=
=?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/CustomSelect/index.js | 137 ++++++++++++------
.../components/CustomSelect/index.less | 52 +++++--
2 files changed, 130 insertions(+), 59 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.js b/pc4mobx/hrmSalary/components/CustomSelect/index.js
index d65fe2ba..43068096 100644
--- a/pc4mobx/hrmSalary/components/CustomSelect/index.js
+++ b/pc4mobx/hrmSalary/components/CustomSelect/index.js
@@ -8,72 +8,119 @@
* @description:
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaCheckbox, WeaInput, WeaLocaleProvider, WeaNewScroll } from "ecCom";
import classNames from "classnames";
-import { Select } from "antd";
+import { Dropdown } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
-const Option = Select.Option;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
- visible: false, dropdownWidth: 200, value: props.value ? props.value.split(",") : []
+ visible: false, value: props.value ? props.value.split(",") : [],
+ keywords: ""
};
- this.selectedData = {};
}
- componentDidMount() {
- const { dropdownWidth } = this.state;
- const w = $(this.refs.customSelectMui).outerWidth();
- console.log($(this.refs.customSelectMui), w)
- if (dropdownWidth < w) {
- this.setState({ dropdownWidth: w });
+ isAllChecked = () => {
+ const { options } = this.props, { value, keywords } = this.state;
+ let v = "0";
+ if (_.uniq(value).length === options.filter(k => k.showname.indexOf(keywords) >= 0).length) v = "1";
+ return v;
+ };
+
+ isChecked = (v) => {
+ const { value } = this.state;
+ return value.indexOf(v) > -1 ? "1" : "0";
+ };
+ onAllChange = (v) => {
+ const { options, onChange } = this.props, { keywords } = this.state;
+ let values = [], shownames = [];
+ if (v == 1) {
+ options.filter(k => k.showname.indexOf(keywords) >= 0).forEach(o => {
+ values.push(o.key);
+ shownames.push(o.showname);
+ });
}
- }
+ this.setState({ value: values });
+ onChange && onChange(values.join(","), shownames.join(","));
+ };
- handleChange = (value) => {
- this.setState({ value });
- typeof this.props.onChange == "function" &&
- this.props.onChange(`${value}`);
+ onItemChange = (v, id) => {
+ const { onChange, options } = this.props, { value } = this.state;
+ let values = !_.isEmpty(value) ? value : [], shownames = [];
+ if (v == "1") {
+ values.push(id);
+ } else {
+ values = values.filter(val => val !== id);
+ }
+ values.forEach(val => {
+ let target = options.filter((data) => data.key == val)[0];
+ if (target) shownames.push(target.showname);
+ });
+ this.setState({ value: values });
+ onChange && onChange(values.join(","), shownames.join(","));
+ };
+
+ getList = () => {
+ const { options } = this.props, { keywords } = this.state;
+ let style = {};
+ if (options.length > 5) style = { height: 200 };
+ return
+
+
+ this.setState({ keywords })}/>
+
+
+
+
+
+ {options && options.filter(k => k.showname.indexOf(keywords) >= 0).map(o => {
+ return
+ this.onItemChange(v, o.key)}
+ >
+
+
;
+ })}
+
+
;
+ };
+
+ getShownames = () => {
+ const { options } = this.props;
+ let { value } = this.state;
+ let shownames = [];
+ value.forEach(val => {
+ let target = options.filter((data) => data.key == val)[0];
+ if (target) shownames.push(target.showname);
+ });
+ return shownames.join(",");
};
render() {
- const { dropdownWidth, visible, value } = this.state;
- const { options = [], defaultValue } = this.props;
+ const { visible } = this.state, { layout } = this.props;
const clsname = classNames({
"wea-associative-search-mult": true
});
- return (
-
-
-
- {!visible ?
:
}
+ return (
+
this.setState({ visible })} visible={visible}
+ getPopupContainer={() => (layout || document.body)}>
+
+ {this.getShownames()}
+ {!this.state.visible ? : }
-
- );
+
+
);
}
}
diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.less b/pc4mobx/hrmSalary/components/CustomSelect/index.less
index ced4bc8e..2f2d7288 100644
--- a/pc4mobx/hrmSalary/components/CustomSelect/index.less
+++ b/pc4mobx/hrmSalary/components/CustomSelect/index.less
@@ -1,19 +1,43 @@
.customMuiSelect {
- .ant-input-group-wrap {
- i {
- padding-left: 2px !important;
- padding-right: 2px !important;
- padding-top: 0;
- padding-bottom: 0;
- line-height: 28px;
- height: 28px;
- border-radius: 2px;
- color: #333 !important;
+ border: none;
+ padding: 0;
+
+ .wea-select-input {
+ min-width: 100px;
+ width: 100%;
+ display: inline-block;
+ padding: 4px 17px 4px 4px;
+ position: relative;
+ min-height: 30px;
+ border: 1px solid #d9d9d9;
+ user-select: none;
+
+ &:hover, &:focus {
+ border-color: #57c5f7;
+ }
+
+ .arrow {
+ position: absolute;
+ right: 4px;
+ top: 8px;
+ color: #979797;
}
}
- .ant-select-selection--multiple {
- max-height: 28px !important;
- overflow-y: auto !important;
- }
}
+
+.wea-select-panel {
+ padding: 5px 0;
+ max-height: 200px;
+ border-radius: 3px;
+ background: #fff;
+ border: 1px solid #ddd;
+
+ .wea-select-panel-item {
+ padding: 5px 10px;
+
+ &:hover {
+ background-color: #e9f7ff;
+ }
+ }
+}
\ No newline at end of file