feature/2.9.42308.02-薪资项目同步到薪资账套

This commit is contained in:
黎永顺 2023-08-31 14:43:57 +08:00
parent a058242d35
commit 036e59b91a
2 changed files with 47 additions and 5 deletions

View File

@ -105,8 +105,40 @@
.salarySetDialog {
.salarySetDialogContent {
.wea-select, .ant-select-selection, .ant-select {
.wea-select, .ant-select, .ant-select-selection {
width: 100%;
}
.wea-select .wea-select-input .arrow {
position: absolute;
right: 4px;
top: 8px;
color: #666;
}
.wea-select .wdb {
word-break: break-all !important;
word-wrap: break-word !important;
}
.wea-select .wea-select-input {
height: 30px;
white-space: nowrap;
min-width: 100px;
max-width: 345px;
width: 100%;
display: inline-block;
padding: 4px 17px 4px 4px;
position: relative;
min-height: 30px;
border: 1px solid #d9d9d9;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
}
}
}

View File

@ -7,9 +7,9 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button } from "antd";
import { Button, message } from "antd";
import { getSearchs } from "../../util";
import { getSalarySobBySalaryItem } from "../../apis/item";
import { getSalarySobBySalaryItem, syncSalaryItemToSalarySobItem } from "../../apis/item";
import { salarySetConditions } from "./columns";
const getLabel = WeaLocaleProvider.getLabel;
@ -53,11 +53,21 @@ class SyncToSalaryAccountSetDialog extends Component {
};
save = () => {
const { salaryItemStore: { salarySetform } } = this.props;
const { salaryItemStore: { salarySetform }, id: salaryItemId } = this.props;
salarySetform.validateForm().then(f => {
console.log(salarySetform.getFormParams());
if (f.isValid) {
const { salarySobIds } = salarySetform.getFormParams();
this.setState({ loading: true });
syncSalaryItemToSalarySobItem({ salaryItemId, salarySobIds: salarySobIds.split(",") })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(38462, "同步成功!"));
this.props.onCancel();
} else {
message.error(errormsg || getLabel(81556, "同步失败!"));
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}