|
@@ -555,7 +555,7 @@ export default {
|
|
|
merchantList: [],
|
|
|
dealerList: [],
|
|
|
groupList: [],
|
|
|
-
|
|
|
+ myID: '',
|
|
|
passwordType1: 'password',
|
|
|
passwordType2: 'password'
|
|
|
}
|
|
@@ -648,7 +648,7 @@ export default {
|
|
|
},
|
|
|
remoteMethod(e) {
|
|
|
this.loading = true
|
|
|
- this.getDealerList(null, e)
|
|
|
+ this.getDealerList(this.myID, e)
|
|
|
},
|
|
|
// 获取经销商列表
|
|
|
async getDealerList(id, e) {
|
|
@@ -673,7 +673,7 @@ export default {
|
|
|
},
|
|
|
remoteMethod2(e) {
|
|
|
this.loading2 = true
|
|
|
- this.getGroupList(null, e)
|
|
|
+ this.getGroupList(this.myID, e)
|
|
|
},
|
|
|
// 获取集团列表
|
|
|
async getGroupList(id, e) {
|
|
@@ -681,6 +681,7 @@ export default {
|
|
|
getDealerList({
|
|
|
pageNum: 1,
|
|
|
pageSize: 300,
|
|
|
+ adminUserId: id || '',
|
|
|
keyword: e
|
|
|
})
|
|
|
.then(res => {
|
|
@@ -779,12 +780,13 @@ export default {
|
|
|
this.AccountFormType = type
|
|
|
this.AccountFormVisible = true
|
|
|
await this.getMerchantList()
|
|
|
- await this.getDealerList(id)
|
|
|
- await this.getGroupList(id)
|
|
|
await this.getRoleList()
|
|
|
await this.getCategoryList()
|
|
|
+ this.myID= id
|
|
|
|
|
|
if (type == 'add') {
|
|
|
+ await this.getDealerList(id)
|
|
|
+ await this.getGroupList(id)
|
|
|
if (this.selectDepartment) {
|
|
|
this.$refs.tree.setCheckedKeys([this.selectDepartment.adminWebsitId])
|
|
|
}
|
|
@@ -793,7 +795,12 @@ export default {
|
|
|
if (type == 'edit') {
|
|
|
this.editAccountId = id
|
|
|
getAccountDetail({ adminUserId: id }).then(res => {
|
|
|
- console.log(res, 78787)
|
|
|
+ if (res.data.customerId) {
|
|
|
+ this.getDealerList(id, res.data.customerId)
|
|
|
+ }
|
|
|
+ if (res.data.groupCompanyId) {
|
|
|
+ this.getGroupList(id, res.data.groupCompanyId)
|
|
|
+ }
|
|
|
this.AccountForm.account = res.data.userName
|
|
|
this.AccountForm.role = res.data.roleId
|
|
|
this.AccountForm.nickName = res.data.nickName
|
|
@@ -806,6 +813,8 @@ export default {
|
|
|
this.AccountForm.k3CategoryIds = res.data.k3CategoryList
|
|
|
this.AccountForm.isShangyong = res.data.isShangyong
|
|
|
this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || [])
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
},
|