feature/2.15.1.2407.01-权限

This commit is contained in:
黎永顺 2024-09-03 16:34:22 +08:00
parent b91f35418e
commit 724c4bb53b
3 changed files with 17 additions and 14 deletions

View File

@ -167,8 +167,9 @@ class LedgerBaseSetting extends Component {
<Col span={18} className="baseSettingLeft">
{
_.map(baseForm, item => {
const { key, label, type, options = [], children = [] } = item;
taxAgentIdDisabled = key === "taxAgentId" && editId && taxAgentId;
const { key, label, type, options = [], children = [], multiple = false } = item;
taxAgentIdDisabled = false;
// taxAgentIdDisabled = key === "taxAgentId" && editId && taxAgentId;
taxableItemsDisabled = key === "taxableItems" && editId;
return <WeaFormItem
key={key} label={label}
@ -190,7 +191,7 @@ class LedgerBaseSetting extends Component {
type === "SELECT" ?
<WeaSelect value={settingBaseInfo[key]}
options={((canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled) && key === "taxAgentId") ? taxAgentOption : options}
viewAttr={3}
viewAttr={3} multiple={multiple}
disabled={canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled}
onChange={(v) => this.handleChangeField(key, v)}/> :
type === "CUSTOM" ?

View File

@ -57,17 +57,18 @@ class LedgerSlide extends Component {
return false;
}
this.setState({ loading: true });
saveLedgerBasic({ ...extra, description, id: editId }).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
const { onRefreshList } = this.props;
message.success("保存成功");
onRefreshList();
!editId && this.setState({ current: current + 1, saveSalarySobId: data });
} else {
message.error(errormsg || "保存失败");
}
}).catch(() => this.setState({ loading: false }));
saveLedgerBasic({ ...extra, description, id: editId, taxAgentIds: extra.taxAgentId.split(",") })
.then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
const { onRefreshList } = this.props;
message.success("保存成功");
onRefreshList();
!editId && this.setState({ current: current + 1, saveSalarySobId: data });
} else {
message.error(errormsg || "保存失败");
}
}).catch(() => this.setState({ loading: false }));
};
/*
* Author: 黎永顺

View File

@ -86,6 +86,7 @@ export const baseSettingFormItem = [
key: "taxAgentId",
label: "个税扣缴义务人",
type: "SELECT",
multiple: true,
options: []
},
{