薪资核算批量编辑

This commit is contained in:
黎永顺 2023-12-11 13:31:46 +08:00
parent 2864e1e446
commit 254d19c44e
3 changed files with 13 additions and 7 deletions

View File

@ -28,12 +28,18 @@ class BatchUpdateSalaryItemValDialog extends Component {
}
save = () => {
const { calculateStore: { batchUpdateForm }, salaryAcctRecordId, salaryItemId, idList, pattern } = this.props;
const {
calculateStore: { batchUpdateForm }, salaryAcctRecordId, salaryItemId,
idList, pattern, dataType
} = this.props;
batchUpdateForm.validateForm().then(f => {
if (f.isValid) {
const { value } = batchUpdateForm.getFormParams();
this.setState({ loading: true });
const payload = { salaryAcctRecordId, salaryItemId, idList, value: toDecimal_n(value, pattern) };
const payload = {
salaryAcctRecordId, salaryItemId, idList,
value: dataType === "number" ? toDecimal_n(value, pattern) : value
};
this.setState({ loading: false });
salaryacctBatchUpdate(payload).then(({ status, errormsg }) => {
if (status) {

View File

@ -28,7 +28,7 @@ class EditCalcTable extends Component {
salaryCalcSlide: { visible: false, id: "" }, originPayloadData: {},
batchUpdateDialog: {
visible: false, salaryAcctRecordId: "", idList: [], salaryItemId: "",
conditions: [], pattern: 0
conditions: [], pattern: 0, dataType: ""
}
};
this.timerLock = null;
@ -125,7 +125,7 @@ class EditCalcTable extends Component {
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: <div>
<div style={{ textAlign: "center" }}>{getLabel(111, "确认编辑所有人员薪资核算记录?")}</div>
<div style={{ textAlign: "center" }}>{getLabel(111, "确认编辑所有人员(所选人员)薪资核算记录?")}</div>
</div>,
onOk: () => {
const { salaryItemId, salaryItemName, dataType, pattern } = payload;
@ -134,7 +134,7 @@ class EditCalcTable extends Component {
this.setState({
batchUpdateDialog: {
...this.state.batchUpdateDialog, visible: true, salaryAcctRecordId, salaryItemId,
idList, pattern, conditions: _.map(batchUpdateConditions, item => ({
idList, pattern, dataType, conditions: _.map(batchUpdateConditions, item => ({
...item, items: _.map(item.items, o => {
if (getKey(o) === "value") {
const otherParams = dataType === "number" ? { precision: pattern } : {};

View File

@ -77,8 +77,8 @@ class Index extends Component {
<span>{formulaObj.formulaContent}</span>
</div>
<div style={{ paddingRight: 8 }}>
<Button type="primary"
onClick={() => this.handleBatchEditing(true)}>{getLabel(111, "批量保存")}</Button>
{/*<Button type="primary"*/}
{/* onClick={() => this.handleBatchEditing(true)}>{getLabel(111, "批量保存")}</Button>*/}
</div>
</div>
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>