薪资账套页面重构

This commit is contained in:
黎永顺 2022-12-12 16:35:19 +08:00
parent 6d9787d924
commit 9e3739d816
3 changed files with 14 additions and 9 deletions

View File

@ -93,6 +93,8 @@
flex-direction: column;
.adjustSalaryFlex{
display: flex;
align-items: center;
margin-bottom: 10px;
}
}

View File

@ -15,17 +15,17 @@ class LedgerAdjustRuleAddModal extends Component {
constructor(props) {
super(props);
this.state = {
beforeAdjustmentType: "",
afterAdjustmentType: "",
beforeAdjustmentType: 4,
afterAdjustmentType: 1,
salaryItemId: "",
salaryItemName: "",
dayOfMonth: "",
dayOfMonth: "1",
salaryItemOptions: []
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.salarySobId) this.listSalarySobItem();
if (nextProps.visible !== this.props.visible && nextProps.salarySobId) this.listSalarySobItem();
}
listSalarySobItem = () => {
@ -59,12 +59,12 @@ class LedgerAdjustRuleAddModal extends Component {
className="adjustRuleModalWrapper"
title={title}
visible={visible}
style={{ width: 680 }}
style={{ width: 780 }}
buttons={buttons}
onCancel={onCancel}
>
<WeaSearchGroup col={1} needTigger title="" showGroup center>
<WeaFormItem label="薪资项目" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaSearchGroup col={1} needTigger title="" showGroup>
<WeaFormItem label="薪资项目" labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
<WeaSelect
viewAttr={3}
value={salaryItemId}
@ -72,12 +72,13 @@ class LedgerAdjustRuleAddModal extends Component {
onChange={(salaryItemId, salaryItemName) => this.setState({ salaryItemId, salaryItemName })}
/>
</WeaFormItem>
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
<div className="adjustRuleDetailWrapper">
<div className="adjustSalaryFlex">
<span>如果调薪生效日期在</span>
<WeaSelect
viewAttr={3}
style={{ width: 60 }}
value={dayOfMonth}
options={monthDays}
onChange={(dayOfMonth) => this.setState({ dayOfMonth })}

View File

@ -48,7 +48,9 @@ class LedgerSalaryAdjustmentRules extends Component {
};
render() {
const { taxAgentStore: { showOperateBtn }, editId, adjustRuleAddModal } = this.props;
const { taxAgentStore: { showOperateBtn }, editId } = this.props;
const { adjustRuleAddModal } = this.state;
const { dataSource, columns } = this.state;
const btns = showOperateBtn ? [
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddAdjustRule}/>
] : [];