소스 검색

fix: 已绑定微信的补货员点击绑定码不再弹窗,直接提示

- openBindingCodeDialog 先检查 wechatOpenid,已绑定则 message 提示后 return
- 同时设置 currentReplenisher 修复弹窗中显示'未知'的问题

Co-Authored-By: Claude <noreply@anthropic.com>
skyline 1 일 전
부모
커밋
58387a388d
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      haha-admin-web/src/views/replenisher/utils/hook.tsx

+ 6 - 0
haha-admin-web/src/views/replenisher/utils/hook.tsx

@@ -340,6 +340,12 @@ export function useReplenisher(tableRef: Ref) {
   const generatingCode = ref(false);
 
   function openBindingCodeDialog(row: ReplenisherFormItem) {
+    // 已绑定微信的补货员无需生成绑定码,只提示不弹窗
+    if (row.wechatOpenid) {
+      message("该补货员已绑定微信,无需重新生成绑定码", { type: "info" });
+      return;
+    }
+    currentReplenisher.value = row;
     bindingCodeData.replenisherName = row.name;
     bindingCodeData.bindingCode = "";
     bindingCodeData.qrCodeDataUrl = "";