diff --git a/src/components/ThirdList/form.js b/src/components/ThirdList/form.js index d62ce123b89c9ad5aa3f6b3a28bb7880b858e098..9825b5a2c3dd387f501c5e7d25f90508f2d16c70 100644 --- a/src/components/ThirdList/form.js +++ b/src/components/ThirdList/form.js @@ -154,6 +154,34 @@ class Index extends React.Component { this.handleCodeWarehouseType(this.props); }); }; + + handleAddGroup = vals => { + const { setFieldsValue } = this.props.form; + this.props.dispatch({ + type: "groupControl/addGroup", + payload: { + team_name: globalUtil.getCurrTeamName(), + ...vals + }, + callback: group => { + if (group) { + // 鑾峰彇缇ょ粍 + this.props.dispatch({ + type: "global/fetchGroups", + payload: { + team_name: globalUtil.getCurrTeamName(), + region_name: globalUtil.getCurrRegionName() + }, + callback: () => { + setFieldsValue({ group_id: group.ID }); + this.cancelAddGroup(); + } + }); + } + } + }); + }; + render() { const { tags, addGroup, tagsLoading, Loading } = this.state; const { getFieldDecorator, getFieldValue } = this.props.form;