From 3d334596c4d23e9f300f12a75b68fba44ea756f8 Mon Sep 17 00:00:00 2001
From: wanyongkang <937888580@qq.com>
Date: Tue, 17 Nov 2020 14:41:43 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E5=AE=A2=E6=88=B7=20?=
=?UTF-8?q?=E5=A4=96=E5=88=86=E5=AE=A2=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/setting/managerlist.vue | 204 +++++++++++++++++++++----
1 file changed, 177 insertions(+), 27 deletions(-)
diff --git a/src/components/setting/managerlist.vue b/src/components/setting/managerlist.vue
index d4c1269..c960605 100644
--- a/src/components/setting/managerlist.vue
+++ b/src/components/setting/managerlist.vue
@@ -8,6 +8,7 @@
icon="el-icon-plus"
v-href="'/user/addmanager'"
>添加子管理员
+ 一键分配用户
@@ -43,41 +44,136 @@
:total="manegeTotal"
>
-
-
-
分配用户
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 筛选
+
+
+
+
+ 输入外分人数:
+
+
+
+
+
+
+
+ 选择接收管理员:
+
+
+
+
+
+
+
+
+ 外分
+
+
+
+
+
+ 向外分配用户
-
-
-
+
+
+
+
+
+ {{manager.RealName}}
+
+
+
+
@@ -137,7 +233,24 @@ export default {
Data: []
},
currentManager: null,
- multipleSelection: null
+ multipleSelection: null,
+ dialogSetManaget: false,
+ manager_list: [],
+ checkAll: false,
+ isIndeterminate: true,
+ select_manege_list: [],
+ innerVisible: false,
+ manager_user_list: [],
+ distribute_num: 1,
+ follow_all_status: [],
+ manager_jingli_list: [],
+ waifen_screen: {
+ money1: null,
+ money2: null,
+ jingli_id: null,
+ follow_status: 1
+ },
+ fenpei_title: ''
}
},
watch: {
@@ -153,7 +266,6 @@ export default {
window.localStorage.getItem('etorcurrentuser')
).Manager
this.getmanagerlist()
- this.getUser()
},
methods: {
handleSelectionChange (val) {
@@ -163,22 +275,31 @@ export default {
setUser (manage) {
this.showUserDialog = true
this.currentManager = manage
+ this.getUser()
},
getUser () {
- this.$api.get('baseinfo/v1/user/Search', this.searchUserModel).then(res => {
- this.userRet = res
+ this.$api.get(this.$api.phpURL + 'manager/SetUser/getManagerUser', {manager_id: this.currentManager.Id, page: this.searchUserModel.PageIndex, search_info: this.searchUserModel.keyWord}).then(res => {
+ this.userRet.Data = res.data.list
+ this.userRet.TotalCount = parseInt(res.data.count)
})
},
doSetUser () {
- var data = {
- ManagerId: this.currentManager.Id,
- ManagerName: this.currentManager.RealName,
- UserIds: this.multipleSelection.map(m => m.Id)
- }
- this.$api.post('baseinfo/v1/user/SetManager', data).then(res => {
- this.getUser()
- this.showUserDialog = false
+ this.fenpei_title = '向外分配用户-' + this.currentManager.RealName
+ this.innerVisible = true
+ this.$api.get(this.$api.phpURL + 'manager/SetUser/getAllManagerUserCount', {}).then(res => {
+ this.manager_user_list = res.data.list
+ this.follow_all_status = res.data.follow_status
+ this.manager_jingli_list = res.data.manager_jingli_list
})
+ // var data = {
+ // ManagerId: this.currentManager.Id,
+ // ManagerName: this.currentManager.RealName,
+ // UserIds: this.multipleSelection.map(m => m.Id)
+ // }
+ // this.$api.post('baseinfo/v1/user/SetManager', data).then(res => {
+ // this.getUser()
+ // this.showUserDialog = false
+ // })
},
geturl (data) {
var that = this
@@ -357,6 +478,35 @@ export default {
ID: item.Id
}
})
+ },
+ autoSetUser () {
+ this.dialogSetManaget = true
+ this.$api.post(this.$api.phpURL + 'manager/SetUser/getManagerList', {}).then(res => {
+ this.manager_list = res.data
+ })
+ },
+ autoSetUserRequest () {
+ this.dialogSetManaget = false
+ this.$api.post(this.$api.phpURL + 'manager/SetUser/autoSet', {manager_list: this.select_manege_list}).then(res => {
+
+ })
+ },
+ screen () {
+ this.$api.get(this.$api.phpURL + 'manager/SetUser/getAllManagerUserCount', {screen: this.waifen_screen}).then(res => {
+ this.manager_user_list = res.data.list
+ })
+ },
+ waifen () {
+ if (!this.waifen_screen.money1 || !this.waifen_screen.money2 || !this.waifen_screen.jingli_id) {
+ this.$message({
+ message: '消费范围与接收管理员必须不为空',
+ type: 'warning'
+ })
+ return
+ }
+ this.$api.get(this.$api.phpURL + 'manager/SetUser/waifen', {screen: this.waifen_screen, num: this.distribute_num, manager_id: this.currentManager.Id}).then(res => {
+ this.screen()
+ })
}
}
}