diff --git a/App.vue b/App.vue index 0e7dcf2..b22e57c 100644 --- a/App.vue +++ b/App.vue @@ -276,7 +276,7 @@ export default { token: resData.token, }; - this.initNim(imOptions); + // this.initNim(imOptions); } ); }, diff --git a/components/list/applyPage.vue b/components/list/applyPage.vue index 22e8a29..85c5e45 100644 --- a/components/list/applyPage.vue +++ b/components/list/applyPage.vue @@ -328,10 +328,12 @@ export default { } else { item.time = that.G.getPointTime(item.updateTime, "MM--DD HH:MM"); } + if (item.status != -1) { + item.status_text = that.G.getOrderStatus().filter((itm, inx) => { + return itm.id == item.status; + })[0].name; + } - item.status_text = that.G.getOrderStatus().filter((itm, inx) => { - return itm.id == item.status; - })[0].name; item.setTitle = that.G.titleToStr(item); }); } else { @@ -345,7 +347,7 @@ export default { } else { that.query.list = that.query.list.concat(res.recordList); } - } + }, ); }, goTel($item) { diff --git a/root/person/applyManage.vue b/root/person/applyManage.vue index e9ccd23..c228457 100644 --- a/root/person/applyManage.vue +++ b/root/person/applyManage.vue @@ -21,18 +21,93 @@ 已过期 已通过 已拒绝 -
+ +
- +
- +
+ + + + + 部门: + + + + {{ item.teamName }} + + + + 选择部门 + + + + + + + 角色: + + + + {{ item.roleName }} + + + + 选择角色 + + + + + + + + + + + 选择部门 + + + + {{ item.teamName }} + + + + + + + + + + {{ child.teamName }} + + + + + + + + 选择角色 + + + {{ item.roleName }} + + + + + + + + + + @@ -40,17 +115,48 @@ export default { data() { return { + themeColor: getApp().globalData.themeColor, applyList: [], query: { page: 1, size: 30 }, + showUserSelect: false, + newMemberInfo: { + department: "", + role: "", + }, + teamList: [], + roleList: [], + configList: {}, + pickerType: "", + markCheck: false, }; }, onShow() { this.getUserApplyList(); this.setTeamManagerStatus(); + this.getConfig(); }, created() {}, methods: { + getConfig() { + let that = this; + this.G.Get("/yishoudan/agency/group/user/apply/getTeamsAndRoles", {}, (res) => { + console.log("getTeamsAndRoles", res); + res.teams.forEach((item) => { + item.checked = false; + item.showChild = false; + if (item.childs.length > 0) { + item.childs.forEach((child) => { + child.checked = false; + }); + } + }); + res.roles.forEach((item) => { + item.checked = false; + }); + that.configList = res; + }); + }, setTeamManagerStatus() { this.G.Get(this.api.order_updateApplyNumHasViewed, {}, (res) => {}); }, @@ -79,18 +185,63 @@ export default { }); }, approve(_item, type) { + const that = this; console.log(_item); console.log(type); - // return; - this.G.Post(this.api.order_userApplyApprove, { id: _item.id, status: type == "reject" ? 2 : 1 }, (res) => { + if (type == "resolve") { + this.showUserSelect = true; + } else { + this.G.Post(this.api.order_userApplyApprove, { id: _item.id, status: 2 }, (res) => { + console.log(res); + _item.status = 2; + uni.showToast({ + title: "操作成功", + icon: "none", + }); + }); + } + }, + uploadUserInfo() { + const that = this; + this.G.Post(this.api.order_userApplyApprove, { id: _item.id, status: 1 }, (res) => { console.log(res); - _item.status = type == "reject" ? 2 : 1; + _item.status = 1; uni.showToast({ title: "操作成功", icon: "none", }); }); }, + setConfig(_item, _type) { + if (_type == "department") { + if (this.teamList.indexOf(_item) == -1) { + this.teamList.push(_item); + } else { + this.teamList.splice(this.teamList.indexOf(_item), 1); + } + } else { + if (this.roleList.indexOf(_item) == -1) { + this.roleList.push(_item); + } else { + this.roleList.splice(this.roleList.indexOf(_item), 1); + } + } + _item.checked = !_item.checked; + }, + showChilds(_item) { + _item.showChild = !_item.showChild; + }, + showPicker(type) { + console.log("showPicker", type); + this.markCheck = true; + this.pickerType = type; + }, + setDepartment(e) { + console.log("eee", this.departmentList[e.detail.value]); + }, + setRole(e) { + console.log("eee", this.roleList[e.detail.value]); + }, }, }; @@ -113,4 +264,42 @@ export default { // border-bottom: none; // } } +.menu-obj { + // min-width: 422px; + + .menu-btn { + margin-right: 8px; + + .btn { + background: rgba(204, 204, 204, 0.2); + border: 1rpx solid transparent; + color: #666666; + white-space: nowrap; + } + } + .menu-active { + .btn { + background: #3578f622; + border: 1rpx solid #3578f6; + color: #3578f6; + box-sizing: border-box; + height: 24px; + line-height: 22px; + } + } +} +.configSelect { + .active { + color: v-bind("themeColor"); + } +} +.btnBox { + position: sticky; + bottom: 0; + padding-top: 12px; + display: flex; + height: unset; + justify-content: center; + background-color: #fff; +}