diff --git a/src/views/user/userDetail.vue b/src/views/user/userDetail.vue index d4a7fd3..1eb4983 100644 --- a/src/views/user/userDetail.vue +++ b/src/views/user/userDetail.vue @@ -1495,12 +1495,84 @@ - - - - - - + +
+ 昵称: + +
+
+ 手机号: + +
+
+ 邀请码: + +
+ 查询 + + 重置 + + + + + + + + + + + + + +
+ +
@@ -2509,7 +2581,10 @@ import { serverPaths } from '@/utils/enumData' ], artificerDates: "", times: [], - + userTableDataLoading: false, + userTableData:{}, + userPage: 1, + userLimit: 10, userName: "", phones: "", avatar: "", @@ -4181,10 +4256,91 @@ import { serverPaths } from '@/utils/enumData' this.age = row.age; this.dialogFormVisible2 = true; }, - // 修改信息弹框 - updataJjr(row) { + // 修改经纪人 + updataJjr() { + this.handleClearUsers(); this.dialogFormVisible3 = true; }, + handleSelectUsers(){ + this.userTableDataLoading = true; + this.$http({ + url: this.$http.adornUrl("commission/jjrData/jjrList"), + method: "get", + params: this.$http.adornParams({ + page: this.userPage, + limit: this.userLimit, + }), + }).then(({data}) => { + if (data.code == 0) { + this.userTableData = data.data; + } else { + this.$notify({ + title: "提示", + duration: 1800, + message: data.msg, + type: "warning", + }); + } + this.userTableDataLoading = false; + }); + }, + + //分页 + handleUserSizeChange(val) { + this.userLimit = val; + this.handleSelectUsers(); + }, + + //翻页 + handleUserCurrentChange(val) { + this.userPage = val; + this.handleSelectUsers(); + }, + + // 重置 + handleClearUsers() { + this.userName = ""; + this.phone = ""; + this.invitationCode = ""; + this.userPage = 1; + this.userLimit = 10; + this.handleSelectUsers(); + }, + + handleAddUser(row){ + let userId = this.$route.query.userId; + let invitationCode = row.invitationCode; + this.$http({ + url: this.$http.adornUrl( + "commission/jjrData/modifyJjr" + ), + method: "post", + params: this.$http.adornParams({ + artificerUserId: userId, + invitationCode: invitationCode, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.dialogFormVisible3 = false; + this.dataSelect(); + }, + }); + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => {}, + }); + } + }); + }, + ageChange2(userId, creditScore) { this.type = ""; this.age = "";