From 51d9c5888834d190f3856d6182473a0b6d786246 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 15 Apr 2025 16:27:19 +0800 Subject: [PATCH] release/2.19.1.2501.01 --- pc4mobx/hrmSalary/apis/payroll.js | 18 +++++++++++++----- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 18 ++++++++++-------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/payroll.js b/pc4mobx/hrmSalary/apis/payroll.js index 48fcecb2..c322c94f 100644 --- a/pc4mobx/hrmSalary/apis/payroll.js +++ b/pc4mobx/hrmSalary/apis/payroll.js @@ -210,18 +210,26 @@ export const payrollCheckType = params => { return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params); }; //工资单-反馈验证 -export const feedBackSalaryBill = params => { +export const feedBackSalaryBill = async params => { const { header, ...payload } = params; - return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, { + const res = await fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, { method: "GET", mode: "cors", headers: { "Content-Type": "application/json", ...header } - }).then(res => res.json()); + }); + return await res.json(); // return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params); }; //工资单-确认 -export const confirmSalaryBill = params => { - return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); +export const confirmSalaryBill = async params => { + const { header, ...payload } = params; + const res = await fetch(`/api/bs/hrmsalary/salaryBill/confirmSalaryBill?${convertToUrlString(payload)}`, { + method: "GET", + mode: "cors", + headers: { "Content-Type": "application/json", ...header } + }); + return await res.json(); + // return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params); }; // 工资单基础设置-获取设置列表 diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 1b598371..69d84928 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -144,14 +144,16 @@ export default class MobilePayroll extends React.Component { return params; }; confirmSalaryBill = () => { - confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => { - if (status) { - message.success(getLabel(30700, "操作成功")); - this.getMySalaryBill(getQueryString("id")); - } else { - message.error(errormsg || getLabel(30651, "操作失败")); - } - }); + const { salaryBillToken } = this.state; + confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(30700, "操作成功")); + this.getMySalaryBill(getQueryString("id")); + } else { + message.error(errormsg || getLabel(30651, "操作失败")); + } + }); }; handleGoFeedback = () => { Modal.confirm({