diff --git a/api/order.js b/api/order.js index 7299537..8341151 100644 --- a/api/order.js +++ b/api/order.js @@ -26,6 +26,7 @@ let orderInfo = { order_addMember: "/yishoudan/user/addAgencyUser",// 添加团队成员 order_updateMember: "/yishoudan/user/updateAgencyCorpUser",// 编辑团队成员 order_delMember: "/yishoudan/user/delAgencyCorpUser",// 删除成员 + order_roleList: "/yishoudan/agency/role/list",// 角色列表 common_getQRCode:"/qrcode/params/get",// 获取邀请码 order_getUserApplyList: "/yishoudan/agency/group/user/apply/userApplyList",// 获取申请加入的成员列表 order_userApplyApprove: "/yishoudan/agency/group/user/apply/approve",// 申请加入审批 diff --git a/pages.json b/pages.json index ae98169..f195689 100644 --- a/pages.json +++ b/pages.json @@ -558,6 +558,15 @@ "navigationBarTitleText": "团队管理" } }, + { + "path": "childGroup", + "style": { + "backgroundColor": "#ededed", + "backgroundColorTop": "#ededed", + "backgroundColorBottom": "#ededed", + "navigationBarTitleText": "" + } + }, { "path": "addOrUpdataMember", "style": { diff --git a/root/merchantManagement/childGroup.vue b/root/merchantManagement/childGroup.vue new file mode 100644 index 0000000..e69de29 diff --git a/root/merchantManagement/teamManage.vue b/root/merchantManagement/teamManage.vue index 5cf2cbc..334743c 100644 --- a/root/merchantManagement/teamManage.vue +++ b/root/merchantManagement/teamManage.vue @@ -45,15 +45,15 @@ -
-
+
{{ item.aliasName || item.userName }} @@ -75,15 +75,19 @@
-
-
-
- +
+
+
+
+ +
+
+
+
+ {{ item.teamName }}({{ item.userNum }}) +
-
添加成员...
@@ -102,13 +106,42 @@ + +
+
+
添加子部门
+
+ +
+
+
+
取消
+
+ + 确定 +
+
+
+
+
添加成员
-
添加部门
-
查看更多
+
添加子部门
+
更多管理
@@ -125,13 +158,19 @@ export default { return { memberList: [], addMemberShow: false, + addTeamShow: false, + addTeamLoading: false, + teamName: "", agencyInfo: uni.getStorageSync("agencyInfo"), applyNum: 0, + teamList: [], }; }, onShow() { - this.getMemberList(); - this.getNewApplyNum(); + let that = this; + this.getNewApplyNum(()=>{ + that.getMemberList(); + }); }, onLoad() {}, created() { @@ -156,16 +195,24 @@ export default { uni.showLoading({ title: "加载中...", }); - this.G.Get(this.api.order_peopleList, { pageSize: 500 }, (res) => { - console.log("报名人列表:", res); - that.memberList = res.recordList; - that.memberList.forEach((item) => { - item.agencyRoleNameList = item.agencyRoleName.split(";"); - item.agencyRoleNameList = item.agencyRoleNameList.sort(this.compare); - }); + // 部门列表 + that.G.Post('/yishoudan/agency/team/list',{},(teamRes)=>{ + console.log('部门列表:', teamRes.list) - uni.hideLoading(); - }); + // 成员列表 + this.G.Get(this.api.order_peopleList, { pageSize: 500 }, (res) => { + console.log("成员列表:", res); + that.memberList = res.recordList; + that.memberList.forEach((item) => { + item.agencyRoleNameList = item.agencyRoleName.split(";"); + item.agencyRoleNameList = item.agencyRoleNameList.sort(this.compare); + }); + + that.teamList = teamRes.list; + + uni.hideLoading(); + }); + }) }, addMember() { this.addMemberShow = true; @@ -181,11 +228,12 @@ export default { }); this.addMemberShow = false; }, - getNewApplyNum() { + getNewApplyNum(callback=() => {}) { let that = this; this.G.Get(this.api.order_getNewApplyNum, {}, (res) => { console.log("order_getNewApplyNum", res); that.applyNum = res; + callback(res); }); }, openChoose() { @@ -215,6 +263,29 @@ export default { return filteredRoles; } return [...filteredRoles.slice(0, 3), '...']; + }, + 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() }, (res) => { + this.addTeamLoading = false; + uni.showToast({ + title: "添加成功", + icon: "success", + }); + this.addTeamShow = false; + this.teamName = ""; + this.getMemberList(); + }, (err) => { + this.addTeamLoading = false; + }); } }, }; diff --git a/static/css/iconfont.css b/static/css/iconfont.css index 7b3a0e7..6229aa9 100644 --- a/static/css/iconfont.css +++ b/static/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: 'iconfont'; /* Project id 4374774 */ - src: url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.woff2?t=1780296933405') format('woff2'), - url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.woff?t=1780296933405') format('woff'), - url('//at.alicdn.com/t/c/font_4374774_3uz0ukj7lp8.ttf?t=1780296933405') format('truetype'); + src: url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.woff2?t=1782283319059') format('woff2'), + url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.woff?t=1782283319059') format('woff'), + url('//at.alicdn.com/t/c/font_4374774_9mzefrjg1b8.ttf?t=1782283319059') format('truetype'); } .iconfont { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-folder:before { + content: "\e7d2"; +} + +.icon-folder-open:before { + content: "\e7d3"; +} + +.icon-folder-fill:before { + content: "\e85e"; +} + +.icon-folder-open-fill:before { + content: "\e85f"; +} + .icon-block:before { content: "\e7e4"; }