feature/2.15.1.2407.01-权限
This commit is contained in:
parent
b91f35418e
commit
724c4bb53b
|
|
@ -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" ?
|
||||
|
|
|
|||
|
|
@ -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: 黎永顺
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ export const baseSettingFormItem = [
|
|||
key: "taxAgentId",
|
||||
label: "个税扣缴义务人",
|
||||
type: "SELECT",
|
||||
multiple: true,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue