diff --git a/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/editRoleDialog.js b/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/editRoleDialog.js
index 933b333e..d8fe3e0e 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/editRoleDialog.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/editRoleDialog.js
@@ -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() {
diff --git a/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/index.js b/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/index.js
index d57c0dfd..bfee4532 100644
--- a/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/index.js
@@ -307,6 +307,23 @@ class Index extends Component {
})}
/>
);
+ case "TAX":
+ return (
+ (o.id))}
+ onCustomChange={replaceDatas => this.setState({
+ replaceDatas: _.map(_.values(replaceDatas), o => ({ id: o.id, name: o.name }))
+ })}
+ />
+ );
default:
return (
);
}