From 4825d0cd494da84999d6417e891cbe388a0d3e8a 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, 6 Dec 2022 15:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/stepSlide/stepSlideHeader.js | 51 ++++++++++--------- pc4mobx/hrmSalary/pages/payroll/index.js | 42 ++++++++------- .../pages/payroll/stepForm/baseInformForm.js | 39 ++++++++++++++ pc4mobx/hrmSalary/stores/payroll.js | 19 ++++--- 4 files changed, 98 insertions(+), 53 deletions(-) diff --git a/pc4mobx/hrmSalary/components/stepSlide/stepSlideHeader.js b/pc4mobx/hrmSalary/components/stepSlide/stepSlideHeader.js index 4a4918d9..35d4ac22 100644 --- a/pc4mobx/hrmSalary/components/stepSlide/stepSlideHeader.js +++ b/pc4mobx/hrmSalary/components/stepSlide/stepSlideHeader.js @@ -1,28 +1,29 @@ -import React from 'react'; -import { WeaSteps } from 'ecCom' +import React from "react"; +import { WeaSteps } from "ecCom"; +import "./index.less"; + const Step = WeaSteps.Step; -import "./index.less" export default class StepSlideHeader extends React.Component { - render() { - return ( -
-
- - { - this.props.steps && this.props.steps.map(item => - ( - - ) - ) - } - -
-
- {this.props.children} -
-
- - ) - } -} \ No newline at end of file + render() { + return ( +
+
+ + { + this.props.steps && this.props.steps.map(item => + ( + + ) + ) + } + +
+
+ {this.props.children} +
+
+ + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 83a1c169..be4f500c 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -278,7 +278,7 @@ export default class Payroll extends React.Component { }]; const renderRightOperation = () => { - if (this.state.selectedKey == "0") { + if (this.state.selectedKey === "0") { return
; - } else if (this.state.selectedKey == "1") { + } else if (this.state.selectedKey === "1") { return (
{ @@ -354,12 +354,7 @@ export default class Payroll extends React.Component { ); } }; - - const steps = [ - "基础设置", - "显示设置" - ]; - + const steps = ["基础设置", "正常核算工资单模板", "补发工资单模版"]; const validateStep1 = () => { const { payrollStore: { templateBaseData } } = this.props; if (!notNull(templateBaseData.name)) { @@ -408,7 +403,7 @@ export default class Payroll extends React.Component { }} /> { - this.state.selectedKey == 0 && + this.state.selectedKey === "0" && { this.handleTemplateListEdit(record); @@ -424,7 +419,7 @@ export default class Payroll extends React.Component { } { - this.state.selectedKey == 1 && + this.state.selectedKey === "1" && { this.handleTemplateListEdit(record); @@ -447,32 +442,43 @@ export default class Payroll extends React.Component { this.setState({ stepSlideVisible: false }); }} customOperate={ - currentStep == 0 ? [ + currentStep === 0 ? [ - ] : currentStep == 1 ? [ + ] : currentStep === 1 ? [ , , + }}>下一步, - ] : [] + ] : currentStep === 2 ? [ + , + , + + ] : + [] } title="新建工资单模板" content={
{ - currentStep == 0 && { - this.handleBaseInfoChange(request); - }}/> + currentStep === 0 && this.handleBaseInfoChange(request)}/> } { - currentStep == 1 && + currentStep === 1 && + } + { + currentStep === 2 &&
补发工资单模版
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js index dca4447e..3878d5a9 100644 --- a/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js +++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/baseInformForm.js @@ -75,6 +75,45 @@ export default class BaseInformForm extends React.Component { onChange={value => this.hanldeChange({ name: value })} /> + + this.hanldeChange({ name: value })} + /> + + + { + }} + /> + + + { + }} + /> + - (this.templateBaseData = templateBaseData); + setTemplateBaseData = templateBaseData => (this.templateBaseData = templateBaseData); // 显示设置基础表单 @action @@ -160,12 +159,12 @@ export class payrollStore { this.salarySobOptions = response.salarySobOptions ? response.salarySobOptions.map(item => { - let result = {}; - result.showname = item.name; - result.key = item.id + ""; - result.selected = false; - return result; - }) + let result = {}; + result.showname = item.name; + result.key = item.id + ""; + result.selected = false; + return result; + }) : []; resolve({ templateBaseData: this.templateBaseData, @@ -453,7 +452,7 @@ export class payrollStore { API.exportDetailList(params); }; // 工资单发放-导出-工资单发放列表 - + @action exportPayroll = (params = {}) => { API.exportPayroll(params);