From b597bdd2bb2330d7a129f101a1d234a8ac021c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Sat, 14 Sep 2024 14:28:58 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.15.1.2407.01-=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roleDetailSetDialog/editRoleDialog.js | 12 ++++++++---- .../components/roleDetailSetDialog/index.js | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) 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 (); }