diff --git a/src/views/modules/operation-management/permission/merchant-account/index.vue b/src/views/modules/operation-management/permission/merchant-account/index.vue index 3651747..f1f0277 100644 --- a/src/views/modules/operation-management/permission/merchant-account/index.vue +++ b/src/views/modules/operation-management/permission/merchant-account/index.vue @@ -202,13 +202,6 @@ >重置密码 - - - @@ -551,7 +544,7 @@ export default { ) if (accountDetails) { this.form.permissionCodes = accountDetails.permissionCodes || [] - this.form.enable = accountDetails.enabled + this.form.enable = accountDetails.status === 1 this.$nextTick(() => { this.$refs.permissionTree.setCheckedKeys(this.form.permissionCodes) }) @@ -606,8 +599,15 @@ export default { this.$message.error('请先选择要更新的商户账号') return } + const selectedAccount = this.merchantAccountList.find( + item => item.merchantId === this.form.merchantId + ) + if (!selectedAccount) { + this.$message.error('无法找到所选商户的详细信息') + return + } const permissionsData = { - merchantAccountId: this.form.merchantId, + merchantAccountId: selectedAccount.merchantAccountId, permissionCodes: this.form.permissionCodes, marketId }