|
|
@@ -260,10 +260,9 @@ onMounted(() => {
|
|
|
// (编辑或查看时调用详情接口获取子账号数据)
|
|
|
const loadSubAccountData = async () => {
|
|
|
if (!accountId.value) return;
|
|
|
-
|
|
|
try {
|
|
|
const storeId = localGet("createdId") || localGet("geeker-user")?.userInfo?.storeId || "";
|
|
|
- const userId = Number(accountId.value);
|
|
|
+ const userId = route.query.userId;
|
|
|
const roleIdNew = Number(route.query.roleId);
|
|
|
const res = await getSubAccountDetail(Number(storeId), userId, roleIdNew);
|
|
|
const code = typeof res.code === "string" ? parseInt(res.code) : res.code;
|
|
|
@@ -320,13 +319,13 @@ const handleSave = async () => {
|
|
|
ElMessage.error("缺少用户ID,无法更新");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
const updateAccountDto = {
|
|
|
accountName: subAccountForm.accountName,
|
|
|
phone: subAccountForm.phone,
|
|
|
- roleId: subAccountForm.roleId || 0,
|
|
|
+ roleId: route.query.roleId || 0,
|
|
|
storeId: storeId,
|
|
|
- userId: subAccountForm.userId
|
|
|
+ userId: route.query.userId,
|
|
|
+ id: accountId.value
|
|
|
};
|
|
|
const res = await updateSubAccount(updateAccountDto);
|
|
|
const code = typeof res.code === "string" ? parseInt(res.code) : res.code;
|