工资单模板添加分类弹框修改

This commit is contained in:
黎永顺 2023-02-08 10:27:38 +08:00
parent 93ea26dfac
commit b9e32efd1c
2 changed files with 8 additions and 10 deletions

View File

@ -20,7 +20,7 @@ class SalaryItemModal extends Component {
onCancel={onCancel}
title={title}
visible={visible}
style={{ width: 500 }}
style={{ width: 600 }}
hasScroll
buttons={buttons}
initLoadCss

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { toJS } from "mobx";
import { WeaFormItem, WeaInput, WeaSelect, WeaSortable } from "ecCom";
import { WeaFormItem, WeaInput, WeaSortable, WeaTransfer } from "ecCom";
import { Icon, Modal } from "antd";
import SalaryItemModal from "./salaryItemModal";
import { getAvailableSalaryGroupSet, getAvailableSalaryItemSet } from "../../../apis/payroll";
@ -134,7 +134,7 @@ class SalaryItemSettings extends Component {
visible: true,
title,
groupId: record.groupId,
options: _.map(data, it => ({ ...it, showname: it.name, key: it.salaryItemId }))
options: _.map(data, it => ({ ...it, name: it.name, id: it.salaryItemId }))
}
});
}
@ -155,7 +155,7 @@ class SalaryItemSettings extends Component {
...modalPayload,
visible: true,
title,
options: _.map(data, it => ({ ...it, showname: it.groupName, key: it.groupId }))
options: _.map(data, it => ({ ...it, name: it.groupName, id: it.groupId }))
}
});
}
@ -269,12 +269,10 @@ class SalaryItemSettings extends Component {
<WeaFormItem label="分类名称" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput value={modalPayload.groupName} onChange={this.handleChangeClassName}/>
</WeaFormItem>
: <WeaSelect
multiple
style={{ width: "100%" }}
value={checkedValue}
options={modalPayload.options}
onChange={v => this.setState({ checkedValue: v })}
: <WeaTransfer
data={modalPayload.options}
selectedKeys={checkedValue ? checkedValue.split(",") : []}
onChange={v => this.setState({ checkedValue: v.join(",") })}
/>
}
</div>