From b99b178f617b4c3aa5bd677387cca7b0dd363809 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 28 Apr 2025 16:13:51 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E8=81=94=E7=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/mySalaryBenefits.js | 4 ++++ .../pages/mobilePayroll/secondarypwdModify.js | 20 ++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js index 75e3eb73..96869045 100644 --- a/pc4mobx/hrmSalary/apis/mySalaryBenefits.js +++ b/pc4mobx/hrmSalary/apis/mySalaryBenefits.js @@ -49,6 +49,10 @@ export const checkPassword = (params, headers) => { return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers); // return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params); }; +export const checkNewSecondaryPwd = (params, headers) => { + return formHeaderPost("/api/hrm/secondarypwd/checkNewSecondaryPwd", "POST", params, headers); + // return WeaTools.callApi("/api/hrm/secondarypwd/checkNewSecondaryPwd", "POST", params); +}; export const saveSecondaryPwd = (params, headers) => { return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers); // return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params); diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js index 3777ee0f..a6fdedc3 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondarypwdModify.js @@ -40,12 +40,12 @@ class SecondarypwdModify extends Component { save = async () => { form.validateForm().then(f => { if (f.isValid) { - const { secondaryPwd1, secondaryPwd2, validatecode } = form.getFormParams(); - if (secondaryPwd1 !== secondaryPwd2) { + const { secondaryPwd1: newSecondaryPwd1, secondaryPwd2: newSecondaryPwd2, validatecode } = form.getFormParams(); + if (newSecondaryPwd1 !== newSecondaryPwd1) { form.showError("secondaryPwd2", getLabel(504376, "密码确认不正确!")); return; } - RSAEcrypt("1", { secondaryPwd1, secondaryPwd2 }).then(RSAParam => { + RSAEcrypt("1", { newSecondaryPwd1, newSecondaryPwd2 }).then(RSAParam => { API.saveSecondaryPwd({ ...RSAParam, validatecode }, this.props.salaryBillToken) .then(({ sign, message: msg }) => { if (sign === "1") { @@ -64,9 +64,23 @@ class SecondarypwdModify extends Component { } }); }; + handleChangeForm = () => { + RSAEcrypt("1", { newSecondaryPwd1: form.getFormParams().secondaryPwd1 }).then(RSAParam => { + API.checkNewSecondaryPwd({ ...RSAParam }).then(({ result }) => { + if (!result) form.showError("secondaryPwd2", getLabel(111, "二次验证密码不能和登录密码相同!")); + }); + }); + }; + render() { const itemRender = { + secondaryPwd1: (field, textAreaProps, form, formParams) => { + return ( + + ); + }, validatecode: (field, textAreaProps, form, formParams) => { return (