门店账户多账号

This commit is contained in:
2026-07-12 12:24:34 +08:00
parent 06b1cb22e0
commit 54a15d6da7
39 changed files with 1962 additions and 311 deletions
@@ -310,6 +310,16 @@ export default function StoreCreatePage() {
setFieldErrors({ phone: phoneMsg });
return;
}
if (phoneCheck.needConfirm) {
const ok = window.confirm(
phoneCheck.message ??
`该手机号已是门店主账号(已绑 ${phoneCheck.existingStoreCount ?? 0} 家店),确认后将追加绑定新店。是否继续?`,
);
if (!ok) {
setFieldErrors({ phone: '已取消绑定已有主账号,请更换手机号或确认后继续' });
return;
}
}
} catch (e) {
reportFormError(e instanceof Error ? e.message : '手机号校验失败');
@@ -381,6 +391,8 @@ export default function StoreCreatePage() {
setFieldErrors({});
let confirmBindExisting = false;
try {
const phoneCheck = await checkStorePhoneAvailable(form.phone.trim());
@@ -397,6 +409,18 @@ export default function StoreCreatePage() {
}
if (phoneCheck.needConfirm) {
const ok = window.confirm(
phoneCheck.message ??
`该手机号已是门店主账号(已绑 ${phoneCheck.existingStoreCount ?? 0} 家店),确认后将追加绑定新店。是否继续?`,
);
if (!ok) {
setFieldErrors({ phone: '已取消绑定已有主账号,请更换手机号或确认后继续' });
return;
}
confirmBindExisting = true;
}
} catch (e) {
reportFormError(e instanceof Error ? e.message : '手机号校验失败');
return;
@@ -440,6 +464,8 @@ export default function StoreCreatePage() {
bankBranch: form.bankBranch.trim(),
...(confirmBindExisting ? { confirmBindExisting: true } : {}),
}),
});