From 61adb172d71df9f90d64f3854853f932cba9561d Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Wed, 24 Jun 2026 16:13:42 +0800 Subject: [PATCH] no message --- root/merchantManagement/childGroup.vue | 69 ++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/root/merchantManagement/childGroup.vue b/root/merchantManagement/childGroup.vue index 13f422d..aeee3a3 100644 --- a/root/merchantManagement/childGroup.vue +++ b/root/merchantManagement/childGroup.vue @@ -73,8 +73,8 @@ - 修改名称 - 删除 + 修改当前部门名称 + 删除当前部门 取消 @@ -84,7 +84,7 @@
-
修改名称
+
修改当前部门名称
+
+
+
添加子部门
+
+ +
+
+
+
取消
+
+ + 确定 +
+
+
+ +
添加成员
+
添加子部门
操作
更多管理
@@ -154,6 +184,10 @@ export default { editNameValue: "", deleteShow: false, deleteLoading: false, + addTeamShow: false, + addTeamLoading: false, + teamName: "", + hideAddTeam: false, agencyInfo: uni.getStorageSync("agencyInfo"), }; }, @@ -200,6 +234,7 @@ export default { that.G.Post('/yishoudan/agency/team/list', {}, (teamRes) => { let currentChild = that.findChildById(teamRes.list, that.currentId); that.teamList = currentChild ? (currentChild.childs || []) : []; + that.hideAddTeam = currentChild && currentChild.levels > 4; that.G.Get(that.api.order_peopleList, { pageSize: 500, @@ -274,7 +309,7 @@ export default { submitDelete() { if (this.deleteLoading) return; this.deleteLoading = true; - this.G.Get(`/yishoudan/agency/team/del/${this.currentId}`, {}, (res) => { + this.G.Post(`/yishoudan/agency/team/del/${this.currentId}`, {}, (res) => { this.deleteLoading = false; uni.showToast({ title: "删除成功", @@ -285,6 +320,32 @@ export default { this.deleteLoading = false; }); }, + submitAddTeam() { + if (!this.teamName || !this.teamName.trim()) { + uni.showToast({ + title: "请输入子部门名称", + icon: "none", + }); + return; + } + if (this.addTeamLoading) return; + this.addTeamLoading = true; + this.G.Post("/yishoudan/agency/team/add", { + teamName: this.teamName.trim(), + parentId: this.currentId, + }, (res) => { + this.addTeamLoading = false; + uni.showToast({ + title: "添加成功", + icon: "success", + }); + this.addTeamShow = false; + this.teamName = ""; + this.getList(); + }, (err) => { + this.addTeamLoading = false; + }); + }, findChildById(list, id) { for (let item of list) { if (String(item.id) === String(id)) {