feature/2.15.1.2407.01-权限
This commit is contained in:
parent
6928f89df6
commit
b597bdd2bb
|
|
@ -55,10 +55,12 @@ class EditRoleDialog extends Component {
|
|||
...o, startValue: nextProps.record[getKey(o)].split("-")[0],
|
||||
endValue: nextProps.record[getKey(o)].split("-")[1],
|
||||
conditionType: "SCOPE", precision: 0
|
||||
} : nextProps.record.targetType === "SOB" ? {
|
||||
} : (nextProps.record.targetType === "SOB" ||
|
||||
nextProps.record.targetType === "TAX") ? {
|
||||
...o, value: nextProps.record["target"],
|
||||
conditionType: "CUSTOMBROWSER", browserConditionParam: {
|
||||
completeURL: "/api/bs/hrmsalary/salarysob/listAuth",
|
||||
completeURL: nextProps.record.targetType === "SOB" ?
|
||||
"/api/bs/hrmsalary/salarysob/listAuth" : "/api/bs/hrmsalary/taxAgent/listAuth",
|
||||
dataParams: { filterType: "QUERY_DATA" },
|
||||
filterByName: true, isSingle: true,
|
||||
tableProps: {}, searchParamsKey: "name",
|
||||
|
|
@ -71,7 +73,8 @@ class EditRoleDialog extends Component {
|
|||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
})),
|
||||
targetSob: { id: nextProps.record["target"], name: nextProps.record["targetName"] }
|
||||
}, () => nextProps.taxAgentStore.roleOperatorForm.initFormFields(this.state.conditions));
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
|
|
@ -126,7 +129,8 @@ class EditRoleDialog extends Component {
|
|||
handleFormChange = (val) => {
|
||||
const { record } = this.props;
|
||||
const key = _.keys(val)[0];
|
||||
if (key === "targetName" && record.targetType === "SOB") this.setState({ targetSob: _.head(val[key]) });
|
||||
if (key === "targetName" && (record.targetType === "SOB" || record.targetType === "TAX"))
|
||||
this.setState({ targetSob: _.head(val[key]) });
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -307,6 +307,23 @@ class Index extends Component {
|
|||
})}
|
||||
/>
|
||||
</WeaFormItem>);
|
||||
case "TAX":
|
||||
return (<WeaFormItem label={getLabel(111, "扣缴义务人")} labelCol={{ span: 4 }} wrapperCol={{ span: 6 }}
|
||||
className="tax_role_browser_form_item">
|
||||
<CustomBrowser
|
||||
fieldConfig={{
|
||||
viewAttr: 2,
|
||||
browserConditionParam: {
|
||||
completeURL: "/api/bs/hrmsalary/taxAgent/listAuth", dataParams: { filterType: "QUERY_DATA" },
|
||||
filterByName: true, tableProps: {}, isSingle: false, searchParamsKey: "name", replaceDatas
|
||||
}
|
||||
}}
|
||||
value={_.map(replaceDatas, o => (o.id))}
|
||||
onCustomChange={replaceDatas => this.setState({
|
||||
replaceDatas: _.map(_.values(replaceDatas), o => ({ id: o.id, name: o.name }))
|
||||
})}
|
||||
/>
|
||||
</WeaFormItem>);
|
||||
default:
|
||||
return (<Row className="tax_role_browser_form_item"></Row>);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue