From 8fa65f4efbbd5002135950bef258537f42102b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 23 Dec 2022 17:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/index.js | 10 +++++----- .../hrmSalary/pages/payroll/stepForm/baseInformForm.js | 2 +- .../pages/payroll/stepForm/showSettingForm.js | 2 +- .../payroll/templatePreview/computerTemplate/index.js | 2 +- .../payroll/templatePreview/phoneTemplate/index.js | 2 +- pc4mobx/hrmSalary/stores/payroll.js | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 8d32eb51..5dba2203 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -78,11 +78,11 @@ export default class Payroll extends React.Component { if (!isEdit) { this.setState({ currentStep: this.state.currentStep + 1 }, () => { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); - window.localStorage.setItem("salaryTemplateShowSet", JSON.stringify(salaryTemplateShowSet)); + window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet)); }); } else { setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet); - window.localStorage.setItem("salaryTemplateShowSet", JSON.stringify(salaryTemplateShowSet)); + window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet)); } } }); @@ -185,8 +185,8 @@ export default class Payroll extends React.Component { // 预览 handlePreview = () => { const { payrollStore: { templateBaseData, salaryTemplateShowSet, salaryItemSet } } = this.props; - window.localStorage.setItem("templateBaseData", JSON.stringify(templateBaseData)); - window.localStorage.setItem("salaryTemplateShowSet", JSON.stringify(salaryTemplateShowSet)); + window.localStorage.setItem("template-basedata", JSON.stringify(templateBaseData)); + window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet)); window.localStorage.setItem("salaryItemSet", JSON.stringify(salaryItemSet)); window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/templatePreview"); }; @@ -243,7 +243,7 @@ export default class Payroll extends React.Component { const { reissueRule = "0" } = templateBaseData; const validList = reissueRule === "0" ? ["name", "replenishName", "salarySob"] : ["name", "replenishName", "salarySob", "replenishRule"]; if (_.every(validList, it => !!templateBaseData[it])) { - window.localStorage.setItem("templateBaseData", JSON.stringify(templateBaseData)); + window.localStorage.setItem("template-basedata", JSON.stringify(templateBaseData)); } else { window.localStorage.removeItem("templateBaseData"); } diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index 6fe0892b..7abd4990 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -20,7 +20,7 @@ export default class BaseInformForm extends React.Component { componentWillMount() { const { payrollStore } = this.props; const { getPayrollBaseForm } = payrollStore; - const templateBaseData = window.localStorage.getItem("templateBaseData") || "{}"; + const templateBaseData = window.localStorage.getItem("template-basedata") || "{}"; getPayrollBaseForm(this.props.id).then(data => { this.setState( { diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js index 15e21c20..2baa38de 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/showSettingForm.js @@ -82,7 +82,7 @@ export default class ShowSettingForm extends React.Component { render() { const { payrollStore, id } = this.props; - const salaryTemplateShowSetStorage = id ? "{}" : window.localStorage.getItem("salaryTemplateShowSet") || "{}"; + const salaryTemplateShowSetStorage = id ? "{}" : window.localStorage.getItem("salary-template-showset") || "{}"; const { salaryTemplateShowSet } = payrollStore; const { salaryItemSet } = payrollStore; const { diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index f1616003..111a08a6 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -22,7 +22,7 @@ export default class ComputerTemplate extends React.Component { componentWillMount() { if (this.props.isPreview) return; - let salaryTemplateShowSetStr = window.localStorage.getItem("salaryTemplateShowSet"); + let salaryTemplateShowSetStr = window.localStorage.getItem("salary-template-showset"); let salaryItemSetStr = window.localStorage.getItem("salaryItemSet"); this.setState({ salaryItemSet: JSON.parse(salaryItemSetStr), diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index f8d94380..fe997ed8 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -24,7 +24,7 @@ export default class PhoneTemplate extends React.Component { componentWillMount() { if(this.props.isPreview) return; - let salaryTemplateShowSetStr = window.localStorage.getItem("salaryTemplateShowSet"); + let salaryTemplateShowSetStr = window.localStorage.getItem("salary-template-showset"); let salaryItemSetStr = window.localStorage.getItem("salaryItemSet"); this.setState({ salaryItemSet: JSON.parse(salaryItemSetStr), diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index 5f1ee444..2e31a3bc 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -187,7 +187,7 @@ export class payrollStore { @action getPayrollShowForm = (id = "") => { const params = { id }; - const salaryTemplateShowSetStorage = window.localStorage.getItem("salaryTemplateShowSet") || "{}"; + const salaryTemplateShowSetStorage = window.localStorage.getItem("salary-template-showset") || "{}"; API.getPayrollShowForm(params).then(res => { if (res.status) { if (id !== "") {