工资单模板修改
This commit is contained in:
parent
b17796f0ab
commit
4825d0cd49
|
|
@ -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 (
|
||||
<div className="stepSlideHeader">
|
||||
<div className="headerWrapper">
|
||||
<WeaSteps current={this.props.current}>
|
||||
{
|
||||
this.props.steps && this.props.steps.map(item =>
|
||||
(
|
||||
<Step description={item} />
|
||||
)
|
||||
)
|
||||
}
|
||||
</WeaSteps>
|
||||
</div>
|
||||
<div className="contentWrapper">
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div className="stepSlideHeader">
|
||||
<div className="headerWrapper">
|
||||
<WeaSteps current={this.props.current}>
|
||||
{
|
||||
this.props.steps && this.props.steps.map(item =>
|
||||
(
|
||||
<Step description={item}/>
|
||||
)
|
||||
)
|
||||
}
|
||||
</WeaSteps>
|
||||
</div>
|
||||
<div className="contentWrapper">
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ export default class Payroll extends React.Component {
|
|||
}];
|
||||
|
||||
const renderRightOperation = () => {
|
||||
if (this.state.selectedKey == "0") {
|
||||
if (this.state.selectedKey === "0") {
|
||||
return <div style={{ display: "inline-block" }}>
|
||||
<WeaHelpfulTip
|
||||
width={200}
|
||||
|
|
@ -306,7 +306,7 @@ export default class Payroll extends React.Component {
|
|||
/>
|
||||
</div>
|
||||
</div>;
|
||||
} else if (this.state.selectedKey == "1") {
|
||||
} else if (this.state.selectedKey === "1") {
|
||||
return (
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{
|
||||
|
|
@ -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" &&
|
||||
<SalarySendList
|
||||
onEditTemplate={(record) => {
|
||||
this.handleTemplateListEdit(record);
|
||||
|
|
@ -424,7 +419,7 @@ export default class Payroll extends React.Component {
|
|||
}
|
||||
|
||||
{
|
||||
this.state.selectedKey == 1 &&
|
||||
this.state.selectedKey === "1" &&
|
||||
<TemplateSettingList
|
||||
onEdit={(record) => {
|
||||
this.handleTemplateListEdit(record);
|
||||
|
|
@ -447,32 +442,43 @@ export default class Payroll extends React.Component {
|
|||
this.setState({ stepSlideVisible: false });
|
||||
}}
|
||||
customOperate={
|
||||
currentStep == 0 ? [
|
||||
currentStep === 0 ? [
|
||||
<Button type="primary" onClick={() => {
|
||||
nextStep();
|
||||
}}>下一步</Button>
|
||||
] : currentStep == 1 ? [
|
||||
] : currentStep === 1 ? [
|
||||
<Button type="default" style={{ marginRight: "10px" }} onClick={() => {
|
||||
prevStep();
|
||||
}}>上一步</Button>,
|
||||
<Button type="primary" onClick={() => {
|
||||
this.handleSave();
|
||||
}}>保存</Button>,
|
||||
}}>下一步</Button>,
|
||||
<Button type="default" style={{ marginLeft: "10px" }} onClick={() => {
|
||||
this.handlePreview();
|
||||
}}>预览</Button>
|
||||
] : []
|
||||
] : currentStep === 2 ? [
|
||||
<Button type="default" style={{ marginRight: "10px" }} onClick={() => {
|
||||
prevStep();
|
||||
}}>上一步</Button>,
|
||||
<Button type="default" style={{ marginLeft: "10px" }} onClick={() => {
|
||||
this.handlePreview();
|
||||
}}>预览</Button>,
|
||||
<Button type="primary" onClick={() => {
|
||||
}}>保存</Button>
|
||||
] :
|
||||
[]
|
||||
}
|
||||
title="新建工资单模板"
|
||||
content={
|
||||
<div>
|
||||
{
|
||||
currentStep == 0 && <BaseInformForm onChange={(request) => {
|
||||
this.handleBaseInfoChange(request);
|
||||
}}/>
|
||||
currentStep === 0 && <BaseInformForm onChange={(request) => this.handleBaseInfoChange(request)}/>
|
||||
}
|
||||
{
|
||||
currentStep == 1 && <ShowSettingForm/>
|
||||
currentStep === 1 && <ShowSettingForm/>
|
||||
}
|
||||
{
|
||||
currentStep === 2 && <div>补发工资单模版</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,45 @@ export default class BaseInformForm extends React.Component {
|
|||
onChange={value => this.hanldeChange({ name: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label="补发工资单模板名称"
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaInput
|
||||
value={""}
|
||||
viewAttr={3}
|
||||
onChange={value => this.hanldeChange({ name: value })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label="补发工资单名单生成规则"
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
options={[{key:"0",showname:"全部"},{key:"1",showname:"按规则"}]}
|
||||
value={""}
|
||||
detailtype={3}
|
||||
viewAttr={3}
|
||||
supportCancel
|
||||
onChange={(v, showname) => {
|
||||
}}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label="规则设置"
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
<WeaSelect
|
||||
options={[]}
|
||||
value={""}
|
||||
viewAttr={3}
|
||||
onChange={(v, showname) => {
|
||||
}}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label="备注"
|
||||
labelCol={{ span: 6 }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { observable, action, toJS } from "mobx";
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
|
||||
|
|
@ -64,8 +64,7 @@ export class payrollStore {
|
|||
|
||||
// 基础信息表单数据
|
||||
@action
|
||||
setTemplateBaseData = templateBaseData =>
|
||||
(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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue