From eb2d77e399602e35a4e9d45867f001e3e66c46ea 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, 11 Jul 2023 17:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=B7=A5=E8=B5=84=E5=8D=95?= =?UTF-8?q?=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 4 +++ .../pages/payroll/payrollGrant/index.js | 12 +++++++- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 29 ++++++++++++++++--- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 7ff084ce..869b008d 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -55,3 +55,7 @@ export const reportStatisticsReportSave = (params) => { export const reportGetForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params); }; +//工资单反馈 +export const saveSalarySendFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params); +}; diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 0be427d5..104d3c08 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -9,6 +9,7 @@ import { getSearchs, renderLoading } from "../../../util"; import CustomPaginationTable from "../../../components/customPaginationTable"; import PayrollPartTable from "./payrollPartTable"; import { getPayrollIssuanceProgressBar } from "../../../apis/payroll"; +import { sysConfCodeRule } from "../../../apis/ruleconfig"; import ProgressModal from "../../../components/progressModal"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,6 +26,7 @@ export default class PayrollGrant extends React.Component { selectedKey: "0", progressVisible: false, progress: 0, + showFeedbackColumn: false, payrollPartModalParams: { visible: false, title: "工资单发放", @@ -49,8 +51,15 @@ export default class PayrollGrant extends React.Component { isGranted: selectedKey !== "0" }); getPaySa(); + this.sysConfCodeRule(); } + sysConfCodeRule = () => { + sysConfCodeRule({ code: "SALARY_SEND_FEEDBACK" }).then(({ status, data }) => { + if (status && data === "1") this.setState({ showFeedbackColumn: data === "1" }); + }); + }; + // 撤回 handleWithdraw = (record) => { const { payrollStore } = this.props; @@ -299,11 +308,12 @@ export default class PayrollGrant extends React.Component { }; getColumns = () => { + const { selectedKey, showFeedbackColumn } = this.state; const { payrollStore } = this.props; const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore; const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0"; return _.map([ - ...toJS(columns), + ..._.filter(toJS(columns), it => ((selectedKey === "0" && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && !showFeedbackColumn && it.dataIndex !== "billReadStatus" && it.dataIndex !== "billConfirmStatus") || (selectedKey === "1" && showFeedbackColumn))), { title: "操作", key: "", diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 6f088528..ed293c72 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -25,7 +25,8 @@ export default class Index extends Component { rule: "", enctry: "", operateTaxDeclaration: "", - matchRule: "" + matchRule: "", + salarySendFeedback: "" }, showEncryptOperationButton: "", progressVisible: false, @@ -53,7 +54,8 @@ export default class Index extends Component { showEncryptOperationButton, isOpenEncrypt: enctry, isOpenTaxDeclaration: operateTaxDeclaration, - salaryAcctEmployeeRule: matchRule + salaryAcctEmployeeRule: matchRule, + salarySendFeedback } } = appSettings; this.setState({ @@ -61,7 +63,7 @@ export default class Index extends Component { showEncryptOperationButton, saveParams: { ...saveParams, - ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule + ascOrDesc, orderRule, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback } }); } @@ -128,6 +130,16 @@ export default class Index extends Component { } }); }; + saveSalarySendFeedback = () => { + API.saveSalarySendFeedback({ confValue: this.state.saveParams.salarySendFeedback }) + .then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(22619, "保存成功!")); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }); + }; operateTaxDeclarationFunction = () => { API.operateTaxDeclarationFunction(_.pick(this.state.saveParams, ["operateTaxDeclaration"])) .then(({ status, errormsg }) => { @@ -227,6 +239,9 @@ export default class Index extends Component { case "enctry": this.saveEncryptSetting(); break; + case "salarySendFeedback": + this.saveSalarySendFeedback(); + break; default: break; } @@ -252,7 +267,7 @@ export default class Index extends Component { employeeOptions, showEncryptOperationButton } = this.state; - const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule } = saveParams; + const { orderRule, ascOrDesc, rule, enctry, operateTaxDeclaration, matchRule, salarySendFeedback } = saveParams; return (